|
46 | 46 | stable_tag: ${{ steps.vars.outputs.stable_tag }}
|
47 | 47 | forked_workflow: ${{ steps.vars.outputs.forked_workflow }}
|
48 | 48 | stable_image_exists: ${{ steps.stable_exists.outputs.exists }}
|
| 49 | + additional_tag: ${{ steps.vars.outputs.additional_tag }} |
49 | 50 | steps:
|
50 | 51 | - name: Checkout Repository
|
51 | 52 | uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
@@ -104,6 +105,13 @@ jobs:
|
104 | 105 | ./.github/scripts/variables.sh docker_md5 >> $GITHUB_OUTPUT
|
105 | 106 | ./.github/scripts/variables.sh build_tag >> $GITHUB_OUTPUT
|
106 | 107 | ./.github/scripts/variables.sh stable_tag >> $GITHUB_OUTPUT
|
| 108 | + ref=${{ github.ref_name }} |
| 109 | + if [[ $ref =~ merge ]]; then |
| 110 | + additional_tag="pr-${ref%*/merge}" |
| 111 | + else |
| 112 | + additional_tag="${ref//\//-}" |
| 113 | + fi |
| 114 | + echo "additional_tag=${additional_tag}" >> $GITHUB_OUTPUT |
107 | 115 | cat $GITHUB_OUTPUT
|
108 | 116 |
|
109 | 117 | - name: Fetch Cached Binary Artifacts
|
@@ -166,6 +174,7 @@ jobs:
|
166 | 174 | echo stable_tag: ${{ steps.vars.outputs.stable_tag }}
|
167 | 175 | echo forked_workflow: ${{ steps.vars.outputs.forked_workflow }}
|
168 | 176 | echo stable_image_exists: ${{ steps.stable_exists.outputs.exists }}
|
| 177 | + echo additional_tag: ${{ steps.vars.outputs.additional_tag }} |
169 | 178 |
|
170 | 179 | unit-tests:
|
171 | 180 | name: Unit Tests
|
@@ -411,6 +420,20 @@ jobs:
|
411 | 420 | pull-requests: write # for scout report
|
412 | 421 | secrets: inherit
|
413 | 422 |
|
| 423 | + tag-target: |
| 424 | + name: Tag untested image with PR number |
| 425 | + needs: [checks, build-docker, build-docker-plus, build-docker-nap] |
| 426 | + permissions: |
| 427 | + contents: read # To checkout repository |
| 428 | + id-token: write # To sign into Google Container Registry |
| 429 | + uses: ./.github/workflows/retag-images.yml |
| 430 | + with: |
| 431 | + source_tag: ${{ needs.checks.outputs.build_tag }} |
| 432 | + target_tag: ${{ needs.checks.outputs.additional_tag }} |
| 433 | + dry_run: false |
| 434 | + secrets: inherit |
| 435 | + if: ${{ inputs.force || (needs.checks.outputs.forked_workflow == 'false' && needs.checks.outputs.stable_image_exists != 'true' && needs.checks.outputs.docs_only == 'false') }} |
| 436 | + |
414 | 437 | helm-tests:
|
415 | 438 | if: ${{ needs.checks.outputs.docs_only != 'true' }}
|
416 | 439 | name: Helm Tests ${{ matrix.base-os }}
|
|
0 commit comments