File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -163,12 +163,12 @@ jobs:
163163 IMAGE_TO_INSPECT : ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
164164 run : |
165165 for i in 1 2 3 4 5; do
166- DIGEST=$(docker buildx imagetools inspect "${IMAGE_TO_INSPECT}" --format '{{.Manifest.Digest }}' 2>/dev/null | tr -d '\n')
167- [ -n "${DIGEST}" ] && break
166+ DIGEST=$(docker buildx imagetools inspect "${IMAGE_TO_INSPECT}" --format '{{json .Manifest}}' 2>/dev/null | jq -r '.digest' | tr -d '\n')
167+ [ -n "${DIGEST}" ] && [ "${DIGEST}" != "null" ] && break
168168 echo "Inspect attempt $i failed, retrying in 5s..."
169169 sleep 5
170170 done
171- if [ -z "${DIGEST}" ]; then echo "Failed to inspect image after 5 attempts"; exit 1; fi
171+ if [ -z "${DIGEST}" ] || [ "${DIGEST}" = "null" ] ; then echo "Failed to inspect image after 5 attempts"; exit 1; fi
172172 images=""
173173 for tag in ${TAGS}; do
174174 images+="${tag}@${DIGEST} "
Original file line number Diff line number Diff line change @@ -163,12 +163,12 @@ jobs:
163163 IMAGE_TO_INSPECT : ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
164164 run : |
165165 for i in 1 2 3 4 5; do
166- DIGEST=$(docker buildx imagetools inspect "${IMAGE_TO_INSPECT}" --format '{{.Manifest.Digest }}' 2>/dev/null | tr -d '\n')
167- [ -n "${DIGEST}" ] && break
166+ DIGEST=$(docker buildx imagetools inspect "${IMAGE_TO_INSPECT}" --format '{{json .Manifest}}' 2>/dev/null | jq -r '.digest' | tr -d '\n')
167+ [ -n "${DIGEST}" ] && [ "${DIGEST}" != "null" ] && break
168168 echo "Inspect attempt $i failed, retrying in 5s..."
169169 sleep 5
170170 done
171- if [ -z "${DIGEST}" ]; then echo "Failed to inspect image after 5 attempts"; exit 1; fi
171+ if [ -z "${DIGEST}" ] || [ "${DIGEST}" = "null" ] ; then echo "Failed to inspect image after 5 attempts"; exit 1; fi
172172 images=""
173173 for tag in ${TAGS}; do
174174 images+="${tag}@${DIGEST} "
You can’t perform that action at this time.
0 commit comments