Skip to content

Commit

Permalink
Merge pull request #153 from adam-cattermole/fix-release-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-cattermole committed Oct 24, 2023
2 parents aee73cf + f5ff784 commit 57023d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ jobs:
VERSION=${{ github.event.inputs.operatorVersion }} \
AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} \
CHANNELS=${{ github.event.inputs.channels }} \
DEFAULT_CHANNEL=${{ github.event.inputs.channels }} \
make prepare-release
- name: Commit and push
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Prepared release v${{ github.event.inputs.operatorVersion }}" -a
git add -A && git commit -m "Prepared release v${{ github.event.inputs.operatorVersion }}"
git push origin release-v${{ github.event.inputs.operatorVersion }}
- name: Create release
uses: softprops/action-gh-release@v1
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ SHELL = /usr/bin/env bash -o pipefail
AUTHORINO_VERSION ?= latest
ifeq (latest,$(AUTHORINO_VERSION))
AUTHORINO_BRANCH = main
AUTHORINO_IMAGE_TAG = latest
else
AUTHORINO_BRANCH = v$(AUTHORINO_VERSION)
AUTHORINO_IMAGE_TAG = v$(AUTHORINO_VERSION)
endif

AUTHORINO_IMAGE_FILE ?= authorino_image
Expand Down Expand Up @@ -140,7 +142,7 @@ manifests: controller-gen kustomize authorino-manifests ## Generate WebhookConfi

.PHONY: authorino-manifests
authorino-manifests: export AUTHORINO_GITREF := $(AUTHORINO_BRANCH)
authorino-manifests: export AUTHORINO_VERSION := $(AUTHORINO_VERSION)
authorino-manifests: export AUTHORINO_IMAGE_TAG := $(AUTHORINO_IMAGE_TAG)
authorino-manifests: ## Update authorino manifests.
envsubst \
< config/authorino/kustomization.template.yaml \
Expand Down Expand Up @@ -266,7 +268,7 @@ prepare-release:
@if [ "$(AUTHORINO_VERSION)" = "latest" ]; then\
[ ! -e "$(AUTHORINO_IMAGE_FILE)" ] || rm $(AUTHORINO_IMAGE_FILE); \
else \
echo quay.io/kuadrant/authorino:v$(AUTHORINO_VERSION) > $(AUTHORINO_IMAGE_FILE); \
echo quay.io/kuadrant/authorino:$(AUTHORINO_IMAGE_TAG) > $(AUTHORINO_IMAGE_FILE); \
fi
$(MAKE) fix-csv-replaces

Expand Down
2 changes: 1 addition & 1 deletion config/authorino/kustomization.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resources:
images:
- name: AUTHORINO_IMAGE
newName: quay.io/kuadrant/authorino
newTag: ${AUTHORINO_VERSION}
newTag: ${AUTHORINO_IMAGE_TAG}

patchesStrategicMerge:
- webhook/patches/webhook_in_authconfigs.yaml
Expand Down

0 comments on commit 57023d1

Please sign in to comment.