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 listExamples
Start the workflow deploy.yml by hand
gh workflow run deploy.ymlworkflow run— start a workflow by handdeploy.yml— a file from .github/workflows
Related commands
- gh run — Follow GitHub Actions runs and read their logs
- gh secret set — Add a secret for GitHub Actions
- gh release — Publish a release and list releases