Skip to content

Retry Workflow Run #3142

Retry Workflow Run

Retry Workflow Run #3142

# This workflow receives a run ID and triggers a retry of its failed jobs.
# This is useful, for example, to retry dependency update PRs automatically in case of network
# errors, flaky tests, etc.
name: Retry Workflow Run
on:
workflow_dispatch:
inputs:
run_id:
description: The ID of the workflow run to retry
required: true
jobs:
retry:
runs-on: ubuntu-latest
steps:
- name: Retry workflow run ${{ 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 }} --failed