Retry workflow #39
This file contains 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
# When triggered with a run_id, this workflow will retry other workflows. This | |
# is useful so we can retry the Serverless Vulnerability Scan action. This must | |
# be a separate action from the action to retry because you cannot retry an | |
# action that is currently running. | |
name: Retry workflow | |
permissions: | |
actions: write | |
on: | |
workflow_dispatch: | |
inputs: | |
run_id: | |
required: true | |
jobs: | |
rerun: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Rerun ${{ inputs.run_id }} | |
env: | |
GH_REPO: ${{ github.repository }} | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1 | |
gh run rerun ${{ inputs.run_id }} |