Skip to content

Commit

Permalink
Specify to retry only on failed jobs (#3772)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3772

It looks like there are many failures on the retry build workflow, but these are mainly due to retry attempts with the --failed flag being unable to rerun workflows that don't have any failed jobs.

Reviewed By: kuarora, junjieqi, ramilbakhshyiev

Differential Revision: D61489426

fbshipit-source-id: 6dcef6ba422634bb333e44a5b12c74c5d3b3df8f
  • Loading branch information
gtwang01 authored and facebook-github-bot committed Aug 21, 2024
1 parent a10b883 commit a43afd6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/retry_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ jobs:
GH_DEBUG: api
run: |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
gh run rerun ${{ inputs.run_id }} --failed
# Only retry if there are failed jobs
if gh run view ${{ inputs.run_id }} --exit-status; then
echo Workflow succeeded - no retry necessary.
else
gh run rerun ${{ inputs.run_id }} --failed
fi

0 comments on commit a43afd6

Please sign in to comment.