From b30f340ea92404aed0ebc22ab35144662754af4f Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 25 Sep 2024 17:07:07 -0400 Subject: [PATCH] apply-tags: Tag multi-arch images as expected When an image is a a multi-arch manifest, skopeo copy will only apply additional tags to the image matching the architecture of the system running skopeo. It does not apply the tag to the multi-arch manifest as expected. In my testing, adding the --multi-arch all flag on single architecture images works without error. --- task/apply-tags/0.1/apply-tags.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/task/apply-tags/0.1/apply-tags.yaml b/task/apply-tags/0.1/apply-tags.yaml index d5a82bf15c..d83ce325e7 100644 --- a/task/apply-tags/0.1/apply-tags.yaml +++ b/task/apply-tags/0.1/apply-tags.yaml @@ -47,7 +47,7 @@ spec: IMAGE_WITHOUT_TAG=$(echo "$IMAGE" | sed 's/:[^:]*$//') for tag in "$@"; do echo "Applying tag $tag" - skopeo copy docker://$IMAGE docker://$IMAGE_WITHOUT_TAG:$tag + skopeo copy --multi-arch all docker://"$IMAGE" docker://"$IMAGE_WITHOUT_TAG:$tag" done else echo "No additional tags parameter specified" @@ -70,7 +70,7 @@ spec: for tag in "${tags_array[@]}" do echo "Applying tag $tag" - skopeo copy docker://$IMAGE docker://$IMAGE_WITHOUT_TAG:$tag + skopeo copy --multi-arch all docker://"$IMAGE" docker://"$IMAGE_WITHOUT_TAG:$tag" done else echo "No additional tags specified in the image labels"