diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a65b9e7..d41449c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,6 +209,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup Badge + id: setup_badge_action uses: RubbaBoy/BYOB@v1.3.0 with: NAME: usd-build-${{ matrix.os }}-${{ matrix.usd_version }} @@ -216,3 +217,20 @@ jobs: STATUS: ${{ steps.setup_badge.outputs.status }} COLOR: ${{ steps.setup_badge.outputs.color }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Retry Push on Failure + if: steps.setup_badge_action.outcome == 'failure' + run: | + set -e + for attempt in {1..5}; do + git pull --rebase origin shields + if git push origin shields; then + echo "Push succeeded on attempt $attempt" + break + else + echo "Push failed, retrying in 10 seconds..." + sleep 10 + fi + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}