capabilities.work

Dispatch and Track a Workflow Run

A 4-step recipe with GitHub Actions. We can help you get access.

Recipe · 4 steps

Dispatch and Track a Workflow Run

with GitHub Actions · Continuous Integration Management
Works with AI assistants

Dispatch a workflow and follow the resulting run to completion.

  1. Trigger the workflow_dispatch event for the named workflow on the supplied git ref. Returns 204 with no body on success.
  2. List the most recent runs for the workflow to capture the id of the run that the dispatch just created (the newest entry).
  3. Fetch the run and check whether it has reached the terminal completed status. Branch back to itself while it is still in progress.
  4. List the jobs executed by the completed run, returning the latest attempt for each job.
What you'll need to have ready
  • accessToken: GitHub bearer token (PAT or OAuth) with Actions write access.
  • owner: The account owner of the repository.
  • repo: The name of the repository without the .git extension.
  • workflowId: The workflow id or workflow file name (e.g. ci.yml).
  • ref: The git branch or tag the workflow should run against.
  • inputs: Optional workflow_dispatch input key/value pairs.
For your developer

Arazzo workflow github-actions:dispatch-and-track-run, 4 operations: createWorkflowDispatch → listWorkflowRuns → getWorkflowRun → listJobsForWorkflowRun. Specs on APIs.io.