add logs
All checks were successful
Docker Build and Push / docker (push) Successful in 1m44s

This commit is contained in:
aiyueqi
2026-04-17 18:36:27 +08:00
parent a39c17b7d7
commit 9287689915

View File

@@ -35,4 +35,24 @@ jobs:
- name: Push Docker Image
run: |
docker push "$IMAGE"
for attempt in 1 2 3; do
echo "Starting docker push attempt ${attempt}/3 for ${IMAGE}"
docker push "$IMAGE" &
PUSH_PID=$!
while kill -0 "$PUSH_PID" 2>/dev/null; do
echo "docker push is still running at $(date -u '+%Y-%m-%dT%H:%M:%SZ')"
sleep 60
done
if wait "$PUSH_PID"; then
echo "docker push completed successfully"
exit 0
fi
echo "docker push failed on attempt ${attempt}/3"
sleep 30
done
echo "docker push failed after 3 attempts"
exit 1