Skip to content

Commit

Permalink
Merge pull request #285 from Kuadrant/ci-set-release-version
Browse files Browse the repository at this point in the history
ci: set release version
  • Loading branch information
eguzki authored Oct 29, 2024
2 parents 2bf9520 + f42e57f commit 32f3db1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build-images-for-tag-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
build-args: |
GIT_SHA=${{ github.sha }}
DIRTY=false
VERSION=${{ github.ref_name }}
dockerfiles: |
./Dockerfile
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Read release string version
id: release
run: |
version=`make read-release-version`
echo version=$version >> $GITHUB_OUTPUT
- name: Add latest tag
if: ${{ github.ref_name == env.MAIN_BRANCH_NAME }}
id: add-latest-tag
Expand All @@ -47,6 +53,7 @@ jobs:
build-args: |
GIT_SHA=${{ github.sha }}
DIRTY=false
VERSION=${{ steps.release.outputs.version }}
dockerfiles: |
./Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ run-with-probes: manifests generate fmt vet ## Run a controller from your host.
docker-build: GIT_SHA=$(shell git rev-parse HEAD || echo "unknown")
docker-build: DIRTY=$(shell hack/check-git-dirty.sh || echo "unknown")
docker-build: ## Build docker image with the manager.
$(CONTAINER_TOOL) build -t ${IMG} . --build-arg GIT_SHA=$(GIT_SHA) --build-arg DIRTY=$(DIRTY)
$(CONTAINER_TOOL) build -t ${IMG} . --build-arg VERSION=v$(VERSION) --build-arg GIT_SHA=$(GIT_SHA) --build-arg DIRTY=$(DIRTY)

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
Expand Down

0 comments on commit 32f3db1

Please sign in to comment.