Skip to content

Commit 3c4d9be

Browse files
committed
feat: append SHORT_COMMIT_HASH to all images
1 parent 06d1fc6 commit 3c4d9be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ jobs:
266266

267267
run: |
268268
echo "Attempting to tag all repositories in ACR $ACR_NAME with short commit hash: $SHORT_COMMIT_HASH"
269+
echo "Source tag for import will be: $ENVIRONMENT_TAG"
269270
270271
# Get list of repositories
271272
repo_list=$(az acr repository list --name "$ACR_NAME" --output tsv)
@@ -282,12 +283,12 @@ jobs:
282283
283284
for repo_name in $repo_list; do
284285
source_image="${ACR_NAME}.azurecr.io/${repo_name}:${ENVIRONMENT_TAG}"
285-
target_image="${ACR_NAME}.azurecr.io/${repo_name}:${SHORT_COMMIT_HASH}"
286+
target_image="${repo_name}:${SHORT_COMMIT_HASH}"
286287
287288
echo "Processing repository: $repo_name"
288289
289290
echo " Checking for existing target tag: $SHORT_COMMIT_HASH"
290-
target_tag_check_output=$(az acr manifest list-metadata --registry "$ACR_NAME" --name "$repo_name" --query "[?tags.contains(@, '${SHORT_COMMIT_HASH}')]" --output tsv 2>&1)
291+
target_tag_check_output=$(az acr manifest list-metadata --registry "$ACR_NAME" --name "$repo_name" --query "[?tags.contains(@, '${SHORT_COMMIT_HASH}')]" --output tsv)
291292
target_tag_check_status=$?
292293
293294
if [ $target_tag_check_status -eq 0 ] && [ -n "$target_tag_check_output" ]; then

0 commit comments

Comments
 (0)