diff --git a/.github/workflows/main-validation-readme.yml b/.github/workflows/main-validation-readme.yml index a2b0420..6c4a7c1 100644 --- a/.github/workflows/main-validation-readme.yml +++ b/.github/workflows/main-validation-readme.yml @@ -484,7 +484,22 @@ jobs: git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add README.md docs/README-details.md git commit -m "chore: refresh generated README from main validation [skip ci]" - git push + + # Avoid push races when multiple runs update main close together. + for attempt in 1 2 3; do + echo "Push attempt $attempt" + git fetch origin main + git rebase origin/main + if git push origin HEAD:main; then + echo "Push succeeded." + exit 0 + fi + echo "Push failed due to remote updates, retrying..." + sleep 3 + done + + echo "Failed to push README update after retries." + exit 1 - name: Upload validation artifacts if: always()