...
1# This can be invoked from any other workflow to re-run itself on failure.
2# From https://github.com/orgs/community/discussions/67654#discussioncomment-8038649
3name: Re-run failed workflow
4
5on:
6 workflow_dispatch:
7 inputs:
8 run_id:
9 description: "The ID of the run to rerun"
10 required: true
11
12concurrency:
13 group: ${{ github.workflow }}-${{ inputs.run_id }}
14 cancel-in-progress: true
15
16jobs:
17 rerun:
18 runs-on: ubuntu-22.04
19 timeout-minutes: 5
20 permissions:
21 actions: write
22 env:
23 GH_REPO: ${{ github.repository }}
24 GH_TOKEN: ${{ github.token }}
25 GH_DEBUG: api
26 steps:
27 - run: gh run watch ${{ inputs.run_id }}
28 - run: gh run rerun ${{ inputs.run_id }} --failed
View as plain text