fix(scripts/Dockerfile): Add back publishing to docker hub

https://github.com/termux/termux-packages/pull/18166 dropped the
publishing to docker hub by mistake - add that back.
This commit is contained in:
Fredrik Fornwall 2023-10-07 00:54:38 +02:00
parent 7b5492eb9c
commit 5fb98efd4e
1 changed files with 12 additions and 10 deletions

View File

@ -50,16 +50,18 @@ jobs:
# ghcr.io seem to be unstable sometimes. It may suddenly drop connection # ghcr.io seem to be unstable sometimes. It may suddenly drop connection
# during docker push when some layers are already uploaded. The workaround # during docker push when some layers are already uploaded. The workaround
# is to retry again 1 or 2 more times. # is to retry again 1 or 2 more times.
for image in package-builder package-builder-cgct; do for registry in "ghcr.io/" ""; do
for t in 1 2 3; do for image in package-builder package-builder-cgct; do
if docker push "ghcr.io/termux/${image}:latest"; then for t in 1 2 3; do
break if docker push "${registry}termux/${image}:latest"; then
else break
if [ "$t" = "3" ]; then else
echo "Giving up after 3 attempts" if [ "$t" = "3" ]; then
exit 1 echo "Giving up after 3 attempts"
exit 1
fi
sleep 20
fi fi
sleep 20 done
fi
done done
done done