GitHub Actions · Arazzo Workflow

GitHub Actions Re-run Failed Jobs and Track

Version 1.0.0

Find the most recent failed run, re-run only its failed jobs, and poll the run until it completes again.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

github-actions

Workflows

rerun-failed-run
Re-run the failed jobs of the latest failed run and follow it to completion.
Lists the repository's failed runs, re-runs the failed jobs of the newest one, and polls the run until its status is completed.
3 steps inputs: accessToken, enableDebugLogging, owner, repo outputs: conclusion, runId
1
findFailedRun
List the repository's runs filtered to the failure status and capture the id of the most recent failed run. Branch to the end when none are failed.
2
rerunFailed
Re-run all failed jobs and their dependents for the selected run. Returns 201 when the re-run is accepted.
3
pollRun
Poll the run until it reaches the terminal completed status, looping back to itself while it is still in progress.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Actions Re-run Failed Jobs and Track
  summary: Find the most recent failed run, re-run only its failed jobs, and poll the run until it completes again.
  description: >-
    A self-healing CI pattern. The workflow lists runs filtered to a failed
    status to locate the most recent failure, re-runs only the failed jobs and
    their dependents, and then polls the run until it reaches a terminal status
    so the new outcome can be reported. Every step spells out its request inline
    so the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4210.10
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4210.10
      capability_name: Continuous Integration Management
      spec: github-actions-workflow-runs-api-openapi.yml
      confidence: 0.8
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: workflowRunsApi
  url: ../openapi/github-actions-workflow-runs-api-openapi.yml
  type: openapi
workflows:
- workflowId: rerun-failed-run
  summary: Re-run the failed jobs of the latest failed run and follow it to completion.
  description: >-
    Lists the repository's failed runs, re-runs the failed jobs of the newest
    one, and polls the run until its status is completed.
  inputs:
    type: object
    required:
    - accessToken
    - owner
    - repo
    properties:
      accessToken:
        type: string
        description: GitHub bearer token with Actions write access.
      owner:
        type: string
        description: The account owner of the repository.
      repo:
        type: string
        description: The name of the repository without the .git extension.
      enableDebugLogging:
        type: boolean
        description: Whether to enable debug logging on the re-run.
  steps:
  - stepId: findFailedRun
    description: >-
      List the repository's runs filtered to the failure status and capture the
      id of the most recent failed run. Branch to the end when none are failed.
    operationId: listWorkflowRunsForRepo
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: status
      in: query
      value: failure
    - name: per_page
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      runId: $response.body#/workflow_runs/0/id
      totalCount: $response.body#/total_count
    onSuccess:
    - name: noFailures
      type: end
      criteria:
      - context: $response.body
        condition: $.total_count == 0
        type: jsonpath
    - name: hasFailure
      type: goto
      stepId: rerunFailed
      criteria:
      - context: $response.body
        condition: $.total_count > 0
        type: jsonpath
  - stepId: rerunFailed
    description: >-
      Re-run all failed jobs and their dependents for the selected run. Returns
      201 when the re-run is accepted.
    operationId: rerunFailedJobs
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $steps.findFailedRun.outputs.runId
    requestBody:
      contentType: application/json
      payload:
        enable_debug_logging: $inputs.enableDebugLogging
    successCriteria:
    - condition: $statusCode == 201
  - stepId: pollRun
    description: >-
      Poll the run until it reaches the terminal completed status, looping back
      to itself while it is still in progress.
    operationId: getWorkflowRun
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $steps.findFailedRun.outputs.runId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      conclusion: $response.body#/conclusion
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollRun
      criteria:
      - context: $response.body
        condition: $.status != "completed"
        type: jsonpath
    - name: completed
      type: end
      criteria:
      - context: $response.body
        condition: $.status == "completed"
        type: jsonpath
  outputs:
    runId: $steps.findFailedRun.outputs.runId
    conclusion: $steps.pollRun.outputs.conclusion

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/github-actions-rerun-failed-run-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.