Skip to content

Commit

Permalink
retry badge
Browse files Browse the repository at this point in the history
  • Loading branch information
kwblackstone committed May 4, 2024
1 parent c16bf1f commit be7beb6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,28 @@ 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 }}
LABEL: ${{ matrix.os }} USD ${{ matrix.usd_version }}
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 }}

0 comments on commit be7beb6

Please sign in to comment.