Repository navigation
Retry Release (auto) #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Retry Release (auto) | |
| # A job inside a run cannot rerun its own run (GitHub rejects reruns while | |
| # the run is in progress), so failed release builds are retried from here. | |
| on: | |
| workflow_run: | |
| workflows: ["Release (auto)"] | |
| types: [completed] | |
| jobs: | |
| retry: | |
| name: Retry failed builds | |
| if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 3 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| steps: | |
| - name: Re-run failed jobs | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| run: gh run rerun ${{ github.event.workflow_run.id }} --failed |