Skip to content

Retry_Failure_Jobs #717

Retry_Failure_Jobs

Retry_Failure_Jobs #717

name: Retry_Failure_Jobs
on:
workflow_dispatch:
inputs:
run_id:
required: true
permissions:
actions: write
jobs:
rerun:
runs-on: ubuntu-latest
steps:
- name: rerun ${{ inputs.run_id }}
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
echo "Waiting for main workflow (Run ID: ${{ inputs.run_id }}) to completely finish..."
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1 || true
echo "Main workflow finished. Triggering rerun for failed jobs..."
gh run rerun ${{ inputs.run_id }} --failed
echo "Rerun triggered successfully!"