Skip to content

Commit

Permalink
enhance CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ahussein3 committed Oct 11, 2023
1 parent b1d00a8 commit cd895b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
- name: Test
run: make test


build:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -98,6 +97,7 @@ jobs:
# if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read # for actions/checkout to fetch code
packages: write # to upload images/helm-chart
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -123,7 +123,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.BUILD_BOT_USER_WRITE_PACKAGES_PAT }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish chart
run: |
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
VERSION ?= $(shell git describe --tags --always)
# Strip off leading `v`: v0.12.0 -> 0.12.0
# Seems to be idiomatic for chart versions: https://helm.sh/docs/topics/charts/#the-chart-file
CHART_VERSION := $(shell echo $(VERSION) | sed 's/^v//')

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
IMG ?= ghcr.io/weaveworks/cluster-reflector-controller:${VERSION}

CHART_REGISTRY ?= ghcr.io/weaveworks/charts

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28.0

VERSION ?= $(shell git describe --tags --always)
# Strip off leading `v`: v0.12.0 -> 0.12.0
# Seems to be idiomatic for chart versions: https://helm.sh/docs/topics/charts/#the-chart-file
CHART_VERSION := $(shell echo $(VERSION) | sed 's/^v//')

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down

0 comments on commit cd895b0

Please sign in to comment.