name: 'Rerun Workflow'
description: 'Re-run GitHub Actions workflow for a given Pull Request'
inputs:
  GITHUB_TOKEN:
    description: 'GitHub token with repo scope'
    required: true
  OWNER:
    description: 'Repository owner'
    required: true
  REPO:
    description: 'Repository name'
    required: true
  PR_ID:
    description: 'Pull Request ID'
    required: true
  JOB_NAME:
    description: 'Job name to rerun'
    required: true

runs:
  using: 'composite'
  steps:
    - run: bash ./.github/actions/rerun-workflow/rerun.sh
      shell: bash
      env:
        GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
        OWNER: ${{ inputs.OWNER }}
        REPO: ${{ inputs.REPO }}
        PR_ID: ${{ inputs.PR_ID }}
        JOB_NAME: ${{ inputs.JOB_NAME }}
