We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6dbfff commit c7fa651Copy full SHA for c7fa651
1 file changed
.github/workflows/update-manifest.yml
@@ -85,4 +85,18 @@ jobs:
85
git commit -m "chore(${SERVICE_NAME}): update image to ${{ steps.info.outputs.branch }}-${{ steps.info.outputs.sha }}" \
86
-m "Triggered by: ${{ github.event.workflow_run.html_url }}"
87
88
- git push origin ${{ steps.info.outputs.branch }}
+ # Retry loop for race conditions
89
+ MAX_RETRIES=5
90
+ for ((i=1; i<=MAX_RETRIES; i++)); do
91
+ echo "🔄 Attempt $i of $MAX_RETRIES to push changes..."
92
+ git pull --rebase origin ${{ steps.info.outputs.branch }}
93
+ if git push origin ${{ steps.info.outputs.branch }}; then
94
+ echo "✅ Push successful!"
95
+ exit 0
96
+ fi
97
+ echo "⚠️ Push failed, retrying in roughly 5 seconds..."
98
+ sleep $((RANDOM % 5 + 3))
99
+ done
100
+
101
+ echo "❌ Failed to push changes after $MAX_RETRIES attempts."
102
+ exit 1
0 commit comments