Skip to content

Commit 9b7eb57

Browse files
committed
ci(docker): retry manifest create to ride out GHCR propagation lag
1 parent 3d00fd5 commit 9b7eb57

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/mintlayer-daemons.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,25 @@ jobs:
157157
IMAGE_NS: ${{ env.REGISTRY }}/${{ env.OWNER }}/web-gui
158158
run: |
159159
set -eu
160+
# GHCR is eventually consistent right after a push: manifest
161+
# creates can hit "manifest unknown" for a minute or two. Retry.
162+
sleep 30
160163
for daemon in $DAEMONS; do
161164
for variant in "$BASE" "$SHA_TAG"; do
162165
args=()
163166
for arch in $ARCHES; do
164167
args+=("--amend" "$IMAGE_NS/$daemon:$variant-$arch")
165168
done
166-
docker manifest create "$IMAGE_NS/$daemon:$variant" "${args[@]}"
169+
attempt=1
170+
until docker manifest create "$IMAGE_NS/$daemon:$variant" "${args[@]}" >/dev/null; do
171+
if [ "$attempt" -ge 6 ]; then
172+
echo "::error::manifest create failed for $IMAGE_NS/$daemon:$variant after $attempt attempts"
173+
exit 1
174+
fi
175+
echo "attempt $attempt failed - retrying in 30s"
176+
sleep 30
177+
attempt=$((attempt + 1))
178+
done
167179
docker manifest push "$IMAGE_NS/$daemon:$variant"
168180
done
169181
done

0 commit comments

Comments
 (0)