From 24571b792ba85c10c3ea3c25ed3889a80c7273f2 Mon Sep 17 00:00:00 2001 From: Pavel Okhlopkov Date: Fri, 16 Jan 2026 10:34:51 +0300 Subject: [PATCH] fix publish release Signed-off-by: Pavel Okhlopkov --- .github/workflows/publish-release.yaml | 32 ++++++++++++++++---------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index f679dbd17..c51f91cab 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -151,16 +151,24 @@ jobs: # Image with multiple manifests has digest in each manifest. manifests=$(docker buildx imagetools inspect "${FINAL_IMAGE_NAME}" --raw) if grep manifests <<<"${manifests}" 2>&1 >/dev/null ; then - jq -r '.manifests[]? | .digest + " " + .platform.os + "/" + .platform.architecture' <<<"${manifests}" + jq -r '.manifests[]? | .digest + " " + .platform.os + "/" + .platform.architecture' <<<"${manifests}" \ + | while read digest platform ; do + image=${FINAL_IMAGE_NAME}@${digest} + if [[ ${BUILDX_PLATFORMS} != *"${platform}"* ]] ; then + echo "=====================================" + echo "Ignore image for non-runnable platform ${platform}" + echo " ${image}" + echo "=====================================" + continue + fi + echo "=====================================" + echo "Inspect image for platform ${platform}" + echo " ${image}" + echo "=====================================" + docker run --rm --platform ${platform} --entrypoint sh ${image} -c \ + 'apk add file > /dev/null; file /bin/kubectl; file /bin/busybox; file /addon-operator' + done else - echo $(echo -n "${manifests}" | openssl dgst -sha256 | sed s/^.stdin.*\ //) ' linux/amd64' - fi \ - | while read digest platform ; do - image=$FINAL_IMAGE_NAME@${digest} - echo "=====================================" - echo "Inspect image for platform ${platform}" - echo " ${image}" - echo "=====================================" - docker run --rm --platform ${platform} --entrypoint sh ${image} -c \ - 'apk add file > /dev/null; file /bin/kubectl; file /bin/busybox; file /addon-operator; file /bin/helm' - done + echo Not a multi-arhitecture image. + #echo $(echo -n "${manifests}" | openssl dgst -sha256) ' linux/amd64' + fi