From 729abf1861155f4273cdf23069668bab646db871 Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Thu, 23 Nov 2023 13:19:07 +0000 Subject: [PATCH] Fix bugs in release workflow --- .github/workflows/build-images.yaml | 4 ++-- .github/workflows/test.yaml | 4 ++-- Makefile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index 13b90b2..9014269 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -122,7 +122,7 @@ jobs: run: make bundle REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} IMAGE_TAG=${{ github.sha }} - name: Run make bundle (release) if: ${{ github.ref_name != env.MAIN_BRANCH_NAME }} - run: make bundle fix-csv-replaces REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} VERSION=${TAG_NAME/v/} AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} CHANNELS=${{ github.event.inputs.channels }} + run: make bundle fix-csv-replaces REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} VERSION=${TAG_NAME/v/} AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} CHANNELS=${{ github.event.inputs.channels }} DEFAULT_CHANNEL=${{ github.event.inputs.channels }} - name: Git diff run: git diff - name: Verify manifests and bundle (main) @@ -130,7 +130,7 @@ jobs: run: make verify-manifests verify-bundle REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} IMAGE_TAG=${{ github.sha }} - name: Verify manifests and bundle (release) if: ${{ github.ref_name != env.MAIN_BRANCH_NAME }} - run: make verify-manifests verify-bundle REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} VERSION=${TAG_NAME/v/} AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} CHANNELS=${{ github.event.inputs.channels }} + run: make verify-manifests verify-bundle REGISTRY=${{ env.IMG_REGISTRY_HOST }} ORG=${{ env.IMG_REGISTRY_ORG }} VERSION=${TAG_NAME/v/} AUTHORINO_VERSION=${{ github.event.inputs.authorinoVersion }} CHANNELS=${{ github.event.inputs.channels }} DEFAULT_CHANNEL=${{ github.event.inputs.channels }} - name: Build Image id: build-image uses: redhat-actions/buildah-build@v2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8bf203e..e47f8b8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -34,9 +34,9 @@ jobs: id: go - name: Check out code uses: actions/checkout@v3 - - name: Run make verify-bundle + - name: Run make bundle verify-bundle run: | - make verify-bundle + make bundle verify-bundle verify-fmt: name: Verify fmt diff --git a/Makefile b/Makefile index 8e52825..8df8662 100644 --- a/Makefile +++ b/Makefile @@ -312,7 +312,7 @@ verify-manifests: manifests $(YQ) ## Verify manifests update. yq e -e '.metadata.annotations.containerImage == "$(OPERATOR_IMAGE)"' config/manifests/bases/authorino-operator.clusterserviceversion.yaml .PHONY: verify-bundle -verify-bundle: bundle $(YQ) ## Verify bundle update. +verify-bundle: $(YQ) ## Verify bundle update. git diff -I'^ containerImage:' -I'^ image:' --exit-code ./bundle [ -z "$$(git ls-files --other --exclude-standard --directory --no-empty-directory ./bundle)" ] yq e -e '.metadata.annotations.containerImage == "$(OPERATOR_IMAGE)"' bundle/manifests/authorino-operator.clusterserviceversion.yaml