gh workflow run

Start a GitHub Actions workflow by hand

What it does

gh workflow run starts a workflow by its file name in .github/workflows or by its name. Only a workflow with the workflow_dispatch trigger can be started this way.

--ref sets the branch, and -f name=value passes inputs, if the workflow declares any. Follow the run with gh run watch. gh workflow list lists every workflow.

Syntax

gh workflow run <file>
gh workflow run <file> --ref <branch> -f <name>=<value>
gh workflow list

Examples

Related commands

Practise · All commands