Rerun flaky PR jobs #7023
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: Rerun flaky PR jobs | |
| on: | |
| # Uses only the trusted default-branch rerun script and treats the run ID as data. | |
| workflow_run: # zizmor: ignore[dangerous-triggers] | |
| workflows: | |
| - "Build pull request" | |
| - "CodeQL" | |
| - "PR build Servlet images for smoke tests" | |
| types: | |
| - completed | |
| concurrency: | |
| group: rerun-flaky-pr-jobs | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| rerun-failed-jobs: | |
| permissions: | |
| actions: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: github.event.workflow_run.conclusion == 'failure' | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Rerun eligible failed jobs | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} | |
| run: python .github/scripts/rerun-failed-workflow-jobs.py |