Reference

apex dispatch

Trigger workflow_dispatch with typed inputs

apex dispatch [options] <workflow>

With an API token, needs the permission actions:write.

Arguments
ArgumentDescription
<workflow>workflow file path or name, e.g. .github/workflows/deploy.yml
Options
OptionDescription
--repo <owner/repo>repository to dispatch in
--ref <ref>branch or tag to run against, as on GitHub (a commit SHA is refused) Default: main.
--input <name=value...>workflow_dispatch input, repeatable

Example

Trigger a workflow_dispatch run with a typed input.

apex dispatch deploy.yml --repo acme/web --ref main --input environment=staging