Dispatch a Workflow and Poll the Run
A 3-step recipe with GitHub. We can help you get access.
Recipe · 3 steps
Dispatch a Workflow and Poll the Run
with GitHub · Continuous Integration Management
Dispatch a workflow, find the run, and poll it until completed.
- Trigger a workflow_dispatch event for the workflow against the supplied ref.
- List the workflow's runs and capture the id of the most recent run, which corresponds to the run that was just dispatched.
- Poll the workflow run until its status reports as completed, retrying while the run is still in progress.
What you'll need to have ready
- githubToken: A GitHub token with actions scope, passed as a Bearer credential.
- owner: The account owner of the repository.
- repo: The name of the repository.
- workflowId: The workflow file name (e.g. ci.yml) or numeric workflow id.
- ref: The git reference (branch or tag) to run the workflow against.
- inputs: Optional input keys and values to pass to the dispatched workflow.
For your developer
Arazzo workflow github:dispatch-workflow-and-poll-run, 3 operations: actions/create-workflow-dispatch → actions/list-workflow-runs → actions/get-workflow-run. Specs on APIs.io.