From bfa745342ee4225a55d948de64c61d8bca5d4ded Mon Sep 17 00:00:00 2001 From: oseoin Date: Wed, 19 Jun 2024 17:03:36 +0100 Subject: [PATCH] Add name to image promotion and always run promotion (#5793) --- .github/workflows/image-promotion.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/image-promotion.yml b/.github/workflows/image-promotion.yml index 80725d943b..d94862b9c0 100644 --- a/.github/workflows/image-promotion.yml +++ b/.github/workflows/image-promotion.yml @@ -1,3 +1,4 @@ +name: Image Promotion # This workflow will: # - build images for forked workflows # - tag stable for forked workflows @@ -299,9 +300,17 @@ jobs: dry_run: false secrets: inherit - tag-edge: + tag-candidate: + # pushes edge or release images to gcr/dev + # for main: this keeps a copy of edge in gcr/dev + # for release-*: this stages a release candidate in gcr/dev which can be used for release promotion name: Tag tested image as stable - needs: [checks, build-docker, build-docker-plus, build-docker-nap] + needs: + - checks + - build-docker + - build-docker-plus + - build-docker-nap + - tag-stable permissions: contents: read # To checkout repository id-token: write # To sign into Google Container Registry @@ -311,9 +320,11 @@ jobs: target_tag: ${{ github.ref_name == github.event.repository.default_branch && 'edge' || github.ref_name }} dry_run: false secrets: inherit + if: ${{ !cancelled() && !failure() }} release-oss: - if: ${{ github.ref_name == github.event.repository.default_branch }} + # pushes edge images to docker hub + if: ${{ !cancelled() && !failure() && github.ref_name == github.event.repository.default_branch }} name: Release Docker OSS needs: [checks, build-docker] uses: ./.github/workflows/oss-release.yml @@ -333,7 +344,8 @@ jobs: secrets: inherit release-plus: - if: ${{ github.ref_name == github.event.repository.default_branch }} + # pushes plus edge images to nginx registry + if: ${{ !cancelled() && !failure() && github.ref_name == github.event.repository.default_branch }} name: Release Docker Plus needs: [checks, build-docker-plus, build-docker-nap] uses: ./.github/workflows/plus-release.yml @@ -352,7 +364,7 @@ jobs: secrets: inherit publish-helm-chart: - if: ${{ github.ref_name == github.event.repository.default_branch }} + if: ${{ !cancelled() && !failure() && github.ref_name == github.event.repository.default_branch }} name: Publish Helm Chart needs: [checks] uses: ./.github/workflows/publish-helm.yml @@ -367,7 +379,7 @@ jobs: secrets: inherit certify-openshift-images: - if: ${{ github.ref_name == github.event.repository.default_branch }} + if: ${{ !cancelled() && !failure() && github.ref_name == github.event.repository.default_branch }} name: Certify OpenShift UBI images runs-on: ubuntu-22.04 needs: [release-oss]