Skip to content

Rerun Flaky Tests

Rerun Flaky Tests #464

name: Rerun Flaky Tests
on:
workflow_run:
workflows: ["Test tgstation-server Integration"]
types:
- completed
jobs:
rerun_flaky_tests:
name: Rerun Flaky Tests
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 5 }}
steps:
- name: Rerun Flaky Tests
uses: actions/github-script@v7
with:
script: |
await github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});