fix(deploy-container): Add retry logic to git push

This commit is contained in:
2026-02-13 16:51:43 +01:00
parent 45f0d6bcda
commit 708275d73d
+26 -2
View File
@@ -150,7 +150,19 @@ runs:
fi
git commit -m "ci(prod): deploy ${{ inputs.project }} $IMAGE_TAG"
git push origin main
# CURSED: Retry logic from head foo
retry=0; git push || retry=1
[ $retry = 0 ] || for i in 1 2 3; do
if [ $retry = 1 ]; then
sleep 1; retry=0
git pull --rebase
git push || retry=1
else
break
fi
done
[ $retry = 0 ]
- name: Deploy to staging
if: inputs.deploy == 'true' && github.ref_type == 'branch' && github.ref_name == 'main' && inputs.apptainer != 'true'
@@ -201,4 +213,16 @@ runs:
fi
git commit -m "ci(staging): deploy ${{ inputs.project }} $IMAGE_TAG"
git push origin main
# CURSED: Retry logic from head foo
retry=0; git push || retry=1
[ $retry = 0 ] || for i in 1 2 3; do
if [ $retry = 1 ]; then
sleep 1; retry=0
git pull --rebase
git push || retry=1
else
break
fi
done
[ $retry = 0 ]