Skip to content

Commit 13949e1

Browse files
committed
feat: devtest using pr number as image identifier
1 parent d6ca590 commit 13949e1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/stage-3-build-images-devtest.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ jobs:
146146
working-directory: ./
147147
if: ${{ steps.detect-base-image-changes.outputs.BASE_IMAGE_CHANGE == 'true' || github.ref == 'refs/heads/main' }}
148148
continue-on-error: false
149+
env:
150+
PR_NUM_TAG : ${{ needs.get-pr-number.outputs.PR_NUM_TAG }}
149151
run: |
150152
SHORT_COMMIT_HASH=$(git rev-parse --short ${GITHUB_SHA})
151153
echo $SHORT_COMMIT_HASH
@@ -171,6 +173,8 @@ jobs:
171173
172174
- name: Set Image Tags
173175
id: set-image-tags
176+
env:
177+
PR_NUM_TAG : ${{ needs.get-pr-number.outputs.PR_NUM_TAG }}
174178
run: |
175179
176180
IMAGE_TAG="latest"
@@ -197,7 +201,7 @@ jobs:
197201
id-token: write
198202
contents: read
199203
pull-requests: read
200-
needs: [get-functions, build-base-images]
204+
needs: [get-functions, build-base-images, get-pr-number]
201205
strategy:
202206
matrix:
203207
function: ${{ fromJSON(needs.get-functions.outputs.FUNC_NAMES) }}
@@ -237,6 +241,8 @@ jobs:
237241
GH_TOKEN: ${{ github.token }}
238242
ENVIRONMENT_TAG: ${{ inputs.environment_tag }}
239243
continue-on-error: false
244+
env:
245+
PR_NUM_TAG : ${{ needs.get-pr-number.outputs.PR_NUM_TAG }}
240246
run: |
241247
echo "The branch is: ${GITHUB_REF}"
242248
@@ -270,6 +276,7 @@ jobs:
270276
COMPOSE_FILE: ${{ inputs.docker_compose_file }}
271277
PROJECT_NAME: ${{ inputs.project_name }}
272278
ACR_NAME: ${{ secrets.acr_name }}
279+
PR_NUM_TAG : ${{ needs.get-pr-number.outputs.PR_NUM_TAG }}
273280
run: |
274281
function=${{ matrix.function }}
275282
@@ -308,6 +315,7 @@ jobs:
308315
env:
309316
PROJECT_NAME: ${{ inputs.project_name }}
310317
ACR_NAME: ${{ secrets.acr_name }}
318+
PR_NUM_TAG : ${{ needs.get-pr-number.outputs.PR_NUM_TAG }}
311319
run: |
312320
function=${{ matrix.function }}
313321
repo_name="${ACR_NAME}.azurecr.io/${PROJECT_NAME}-${function}"

0 commit comments

Comments
 (0)