From 80cb879cb71cfe0c314e803b130e23cba58a0861 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 4 Mar 2024 11:45:28 -0600 Subject: [PATCH] Create copied manifest rather than retagging (#252) --- bin/publish-to-registries.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/publish-to-registries.sh b/bin/publish-to-registries.sh index fc62c521..70a2c717 100755 --- a/bin/publish-to-registries.sh +++ b/bin/publish-to-registries.sh @@ -16,13 +16,19 @@ push_group() { local sourceTagSuffix="$2" local targetTagSuffix="$3" variants=("" "-build") - if (( STACK_VERSION <= 22 )); then + if (( STACK_VERSION < 24 )); then variants+=("-cnb" "-cnb-build") fi for variant in "${variants[@]}"; do source="${tagBase}${variant}${sourceTagSuffix}" target="${tagBase}${variant}${targetTagSuffix}" - docker tag "${source}" "${target}" + if (( STACK_VERSION < 24 )); then + # Re-tag amd64-only images + docker tag "${source}" "${target}" + else + # Make a carbon copy image index for multi-arch images + docker buildx imagetools create -t "${target}" "${source}" + fi docker push "${target}" done }