File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -726,6 +726,35 @@ jobs:
726
726
platforms : linux/amd64,linux/arm64,linux/arm/v7
727
727
tags : ${{ steps.image-base-tag.outputs.base_tag }}
728
728
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
+
729
758
- name : Build Linux Docker images
730
759
id : build-docker
731
760
run : |
You can’t perform that action at this time.
0 commit comments