Run-on-demand pipelines
workflow_dispatch exposes a 'Run workflow' button in the Actions UI (plus gh workflow run from CLI and the API). It's the right trigger for ad-hoc work: manual deploys, one-off backfills, debug sessions.
Typed inputs
string(default).boolean— UI shows a checkbox.number.choice— dropdown withoptions:.environment— dropdown of repo environments.
Triggering from CLI
gh workflow run deploy.yml -f env=production -f version=v1.4.2
Why this beats SSHing into the runner
- Audit log — every dispatch is recorded.
- Auth — runs as the dispatching user, secrets and permissions apply.
- Reproducible — the YAML is the script.
- Visible — anyone can see what's running and what was run.