Skip to content

Commit 8dd78cd

Browse files
committed
wip
1 parent 30e9470 commit 8dd78cd

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,35 @@ jobs:
726726
platforms: linux/amd64,linux/arm64,linux/arm/v7
727727
tags: ${{ steps.image-base-tag.outputs.base_tag }}
728728

729+
- name: Verify that images are pushed properly
730+
run: |
731+
# retry 10 times with a 5 second delay as the images may not be
732+
# available immediately
733+
for i in {1..10}; do
734+
rc=0
735+
raw_manifests=$(docker buildx imagetools inspect --raw "${{ steps.image-base-tag.outputs.tag }}") || rc=$?
736+
if [[ "$rc" -eq 0 ]]; then
737+
break
738+
fi
739+
if [[ "$i" -eq 10 ]]; then
740+
echo "Failed to pull manifests after 10 retries"
741+
exit 1
742+
fi
743+
echo "Failed to pull manifests, retrying in 5 seconds"
744+
sleep 5
745+
done
746+
747+
manifests=$(
748+
echo "$raw_manifests" | \
749+
jq -r '.manifests[].platform | .os + "/" + .architecture + (if .variant then "/" + .variant else "" end)'
750+
)
751+
752+
# Verify all 3 platforms are present.
753+
set -euxo pipefail
754+
echo "$manifests" | grep -q linux/amd64
755+
echo "$manifests" | grep -q linux/arm64
756+
echo "$manifests" | grep -q linux/arm/v7
757+
729758
- name: Build Linux Docker images
730759
id: build-docker
731760
run: |

0 commit comments

Comments
 (0)