Skip to content

Commit b7e2d26

Browse files
committed
Correctly parse image:tag in the digest files when merging manifests
1 parent 15b0aa7 commit b7e2d26

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build-push.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,16 +437,20 @@ jobs:
437437
# Read the digests from the files
438438
DIGEST_AMD64=$(cat /tmp/digests/amd64.digest)
439439
DIGEST_ARM64=$(cat /tmp/digests/arm64.digest)
440-
# Get the image name from the digests (they'll be the same)
441-
REGISTRY_IMAGE=$(echo $DIGEST_AMD64 | cut -d'@' -f1)
440+
# Get the base image name from the digests (they'll be the same)
441+
REGISTRY_IMAGE_TAG=$(echo $DIGEST_AMD64 | cut -d'@' -f1)
442+
REGISTRY_IMAGE=$(echo $REGISTRY_IMAGE_TAG | cut -d':' -f1)
442443
REGISTRY=$(echo $REGISTRY_IMAGE | cut -d'/' -f1-2)
443444
IMAGE=$(echo $REGISTRY_IMAGE | cut -d'/' -f3)
445+
TAG=$(echo $REGISTRY_IMAGE_TAG | cut -d':' -f2)
444446
echo "Registry Name: $REGISTRY"
445447
echo "Image Name: $IMAGE"
448+
echo "Tag Name: $TAG"
446449
echo "AMD64 Digest: $DIGEST_AMD64"
447450
echo "ARM64 Digest: $DIGEST_ARM64"
448451
echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
449452
echo "image=$IMAGE" >> $GITHUB_OUTPUT
453+
echo "tag=$TAG" >> $GITHUB_OUTPUT
450454
echo "amd64=$DIGEST_AMD64" >> $GITHUB_OUTPUT
451455
echo "arm64=$DIGEST_ARM64" >> $GITHUB_OUTPUT
452456
- name: Extract Docker metadata for final tags

0 commit comments

Comments
 (0)