File tree Expand file tree Collapse file tree 1 file changed +1
-26
lines changed
Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -116,29 +116,4 @@ jobs:
116116 --push .
117117 - name : Inspect binaries
118118 if : needs.check.outputs.build_multi_arch == 'true'
119- run : |
120- # Image for one arhitecture has digest in config field.
121- # Image with multiple manifests has digest in each manifest.
122- manifests=$(docker buildx imagetools inspect "${GHCR_IO_IMAGE_NAME}" --raw)
123- if grep manifests <<<"${manifests}" 2>&1 >/dev/null ; then
124- jq -r '.manifests[]? | .digest + " " + .platform.os + "/" + .platform.architecture' <<<"${manifests}" \
125- | while read digest platform ; do
126- image=${GHCR_IO_IMAGE_NAME}@${digest}
127- if [[ ${BUILDX_PLATFORMS} != *"${platform}"* ]] ; then
128- echo "====================================="
129- echo "Ignore image for non-runnable platform ${platform}"
130- echo " ${image}"
131- echo "====================================="
132- continue
133- fi
134- echo "====================================="
135- echo "Inspect image for platform ${platform}"
136- echo " ${image}"
137- echo "====================================="
138- docker run --rm --platform ${platform} --entrypoint sh ${image} -c \
139- 'apk add file > /dev/null; file /bin/kubectl; file /bin/busybox; file /shell-operator'
140- done
141- else
142- echo Not a multi-arhitecture image.
143- #echo $(echo -n "${manifests}" | openssl dgst -sha256) ' linux/amd64'
144- fi
119+ run: "# Image for one arhitecture has digest in config field.\n# Image with multiple manifests has digest in each manifest.\nmanifests=$(docker buildx imagetools inspect \"${GHCR_IO_IMAGE_NAME}\" --raw)\nif grep manifests <<<\"${manifests}\" 2>&1 >/dev/null ; then\n jq -r '.manifests[]? | .digest + \" \" + .platform.os + \"/\" + .platform.architecture' <<<\"${manifests}\" \\\n | while read digest platform ; do\n image=${GHCR_IO_IMAGE_NAME}@${digest}\n if [[ ${BUILDX_PLATFORMS} != *\"${platform}\"* ]] ; then\n echo \"=====================================\"\n echo \"Ignore image for non-runnable platform ${platform}\"\n echo \" ${image}\"\n echo \"=====================================\"\n continue \n fi\n echo \"=====================================\"\n echo \"Inspect image for platform ${platform}\"\n echo \" ${image}\"\n echo \"=====================================\"\n docker run --rm --platform ${platform} --entrypoint sh ${image} -c \\\n 'apk add file > /dev/null; file /bin/kubectl; file /bin/busybox; file /shell-operator'\n done\nelse\n echo Not a multi-arhitecture image.\n #echo $(echo -n \"${manifests}\" | openssl dgst -sha256) ' linux/amd64'\nfi\n"
You can’t perform that action at this time.
0 commit comments