gh api -X POST repos/owner/repo/actions/workflows/build.yml/dispatches -f ref=main
Dispatch a workflow run via the REST API
POSTs a workflow_dispatch event for build.yml on ref main, the API equivalent of gh workflow run. The workflow must declare a workflow_dispatch trigger. Pass inputs as extra -f fields if the workflow defines them.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.