ci: retry registry push on transient timeout
All checks were successful
CI / ci (push) Successful in 6m26s

This commit is contained in:
Brad Rodgers 2026-07-16 17:43:44 -04:00
parent 28438dcde6
commit 79f2e8a78b

View File

@ -73,8 +73,17 @@ jobs:
run: | run: |
echo "${{ secrets.CI_TOKEN }}" | docker login 10.66.15.22:3000 -u "${{ github.repository_owner }}" --password-stdin echo "${{ secrets.CI_TOKEN }}" | docker login 10.66.15.22:3000 -u "${{ github.repository_owner }}" --password-stdin
docker build -t "$IMAGE:${{ steps.tag.outputs.sha }}" -t "$IMAGE:latest" . docker build -t "$IMAGE:${{ steps.tag.outputs.sha }}" -t "$IMAGE:latest" .
docker push "$IMAGE:${{ steps.tag.outputs.sha }}" # Registry pushes can time out on a slow blob; docker push is resumable, so retry.
docker push "$IMAGE:latest" push_retry() {
for i in 1 2 3 4 5; do
docker push "$1" && return 0
echo "push of $1 failed (attempt $i), retrying in 10s..."
sleep 10
done
return 1
}
push_retry "$IMAGE:${{ steps.tag.outputs.sha }}"
push_retry "$IMAGE:latest"
- name: Bump k8s image tag and commit back - name: Bump k8s image tag and commit back
run: | run: |