Skip to content

Commit

Permalink
Add name to image promotion and always run promotion (nginx#5793)
Browse files Browse the repository at this point in the history
  • Loading branch information
oseoin authored and ssrahul96 committed Jun 20, 2024
1 parent 8a16ea1 commit b6b02ad
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/image-promotion.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Image Promotion
# This workflow will:
# - build images for forked workflows
# - tag stable for forked workflows
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit b6b02ad

Please sign in to comment.