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