mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
workflows/docker: add retry to image push
Signed-off-by: Patrick Linnane <patrick@linnane.io>
This commit is contained in:
parent
a47ff13114
commit
a3af7f823f
11
.github/workflows/docker.yml
vendored
11
.github/workflows/docker.yml
vendored
@ -306,4 +306,13 @@ jobs:
|
|||||||
image_args+=("ghcr.io/homebrew/ubuntu${VERSION}@sha256:$(<"${RUNNER_TEMP}/digests/${VERSION}-arm64")")
|
image_args+=("ghcr.io/homebrew/ubuntu${VERSION}@sha256:$(<"${RUNNER_TEMP}/digests/${VERSION}-arm64")")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker buildx imagetools create "${tag_args[@]}" "${image_args[@]}"
|
attempts=0
|
||||||
|
until docker buildx imagetools create "${tag_args[@]}" "${image_args[@]}"; do
|
||||||
|
attempts=$((attempts + 1))
|
||||||
|
if [[ $attempts -ge 3 ]]; then
|
||||||
|
echo "[$(date -u)] ERROR: Failed after 3 attempts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Push failed (attempt $attempts). Retrying in $((attempts * 5)) seconds..."
|
||||||
|
sleep $((attempts * 5))
|
||||||
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user