ci(docker_image.yml): workaround for sometimes unstable ghcr.io
ghcr.io sometimes drops connection when image is pushed from GitHub Actions. I never observed that behavior when pushing the image built locally, so don't know what triggers that issue. The workaround is to just try pushing the image again.
This commit is contained in:
parent
28690abbbd
commit
47e6537bb2
|
@ -43,5 +43,17 @@ jobs:
|
|||
- name: Push
|
||||
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'termux/termux-packages'
|
||||
run: |
|
||||
docker push ghcr.io/termux/package-builder:latest
|
||||
# ghcr.io seem to be unstable sometimes. It may suddenly drop connection
|
||||
# during docker push when some layers are already uploaded. The workaround
|
||||
# is to retry again 1 or 2 more times.
|
||||
for t in 1 2 3; do
|
||||
if docker push "ghcr.io/termux/package-builder:latest"; then
|
||||
break
|
||||
else
|
||||
if [ "$t" = "3" ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
docker push termux/package-builder:latest
|
||||
|
|
Loading…
Reference in New Issue