fix(ci): retry transient Docker registry mirror failures
This commit is contained in:
1 parent
b00f649e8c
commit
d16412f3ae
2 files changed
+16
-3
No files matched your search
@@ -208,9 +208,19 @@ jobs:
|
||||
run: |
|
||||
while IFS= read -r image_tag; do
|
||||
[[ -n "${image_tag}" ]] || continue
|
||||
docker buildx imagetools create \
|
||||
--tag "${TCR_IMAGE_NAME}:${image_tag}" \
|
||||
"${GHCR_IMAGE_NAME}:${image_tag}"
|
||||
for attempt in 1 2 3; do
|
||||
if docker buildx imagetools create \
|
||||
--tag "${TCR_IMAGE_NAME}:${image_tag}" \
|
||||
"${GHCR_IMAGE_NAME}:${image_tag}"; then
|
||||
break
|
||||
fi
|
||||
if [[ "${attempt}" -eq 3 ]]; then
|
||||
echo "Failed to mirror ${image_tag} after ${attempt} attempts" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Mirror attempt ${attempt} failed for ${image_tag}; retrying" >&2
|
||||
sleep "$((attempt * 15))"
|
||||
done
|
||||
done <<< "${MIRROR_TAGS}"
|
||||
|
||||
- name: Verify mirrored anonymous image access
|
||||
|
||||
Reference in new issue
Block a user