GitHub · Arazzo Workflow

GitHub Dispatch a Workflow and Poll the Run

Version 1.0.0

Trigger a workflow_dispatch event, locate the resulting run, and poll it to completion.

1 workflow 1 source API 1 provider
View Spec View on GitHub CodePipelinesPlatformSoftware DevelopmentSource ControlT1ArazzoWorkflows

Provider

github

Workflows

dispatch-workflow-and-poll-run
Dispatch a workflow, find the run, and poll it until completed.
Triggers a workflow_dispatch event, lists runs for the workflow to obtain the latest run id, and polls the run until it completes.
3 steps inputs: githubToken, inputs, owner, ref, repo, workflowId outputs: conclusion, runId, runUrl
1
dispatchWorkflow
Trigger a workflow_dispatch event for the workflow against the supplied ref.
2
findRun
List the workflow's runs and capture the id of the most recent run, which corresponds to the run that was just dispatched.
3
pollRun
Poll the workflow run until its status reports as completed, retrying while the run is still in progress.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Dispatch a Workflow and Poll the Run
  summary: Trigger a workflow_dispatch event, locate the resulting run, and poll it to completion.
  description: >-
    The CI orchestration pattern for manually triggered workflows. The workflow
    fires a workflow_dispatch event for a workflow on a given ref, lists the
    workflow's runs to capture the most recent run id, and then polls that run
    until its status reports as completed before reading its conclusion. The poll
    step retries on the completed condition so the flow waits for the run to
    finish. 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
sourceDescriptions:
- name: actionsApi
  url: ../openapi/github-actions-api-openapi.yml
  type: openapi
workflows:
- workflowId: dispatch-workflow-and-poll-run
  summary: Dispatch a workflow, find the run, and poll it until completed.
  description: >-
    Triggers a workflow_dispatch event, lists runs for the workflow to obtain
    the latest run id, and polls the run until it completes.
  inputs:
    type: object
    required:
    - githubToken
    - owner
    - repo
    - workflowId
    - ref
    properties:
      githubToken:
        type: string
        description: A GitHub token with actions scope, passed as a Bearer credential.
      owner:
        type: string
        description: The account owner of the repository.
      repo:
        type: string
        description: The name of the repository.
      workflowId:
        type: string
        description: The workflow file name (e.g. ci.yml) or numeric workflow id.
      ref:
        type: string
        description: The git reference (branch or tag) to run the workflow against.
      inputs:
        type: object
        description: Optional input keys and values to pass to the dispatched workflow.
  steps:
  - stepId: dispatchWorkflow
    description: >-
      Trigger a workflow_dispatch event for the workflow against the supplied
      ref.
    operationId: actions/create-workflow-dispatch
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: workflow_id
      in: path
      value: $inputs.workflowId
    requestBody:
      contentType: application/json
      payload:
        ref: $inputs.ref
        inputs: $inputs.inputs
    successCriteria:
    - condition: $statusCode == 204
  - stepId: findRun
    description: >-
      List the workflow's runs and capture the id of the most recent run, which
      corresponds to the run that was just dispatched.
    operationId: actions/list-workflow-runs
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: workflow_id
      in: path
      value: $inputs.workflowId
    - name: branch
      in: query
      value: $inputs.ref
    - name: per_page
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      runId: $response.body#/workflow_runs/0/id
  - stepId: pollRun
    description: >-
      Poll the workflow run until its status reports as completed, retrying
      while the run is still in progress.
    operationId: actions/get-workflow-run
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: owner
      in: path
      value: $inputs.owner
    - name: repo
      in: path
      value: $inputs.repo
    - name: run_id
      in: path
      value: $steps.findRun.outputs.runId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.status == "completed"
      type: jsonpath
    onFailure:
    - name: waitAndRetry
      type: retry
      retryAfter: 10
      retryLimit: 30
      stepId: pollRun
    outputs:
      runStatus: $response.body#/status
      conclusion: $response.body#/conclusion
      runUrl: $response.body#/html_url
  outputs:
    runId: $steps.findRun.outputs.runId
    conclusion: $steps.pollRun.outputs.conclusion
    runUrl: $steps.pollRun.outputs.runUrl

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-dispatch-workflow-and-poll-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.