What is `workflow_dispatch` and how are inputs used?
BeginnerConceptGitHub Actions
Answer
workflow_dispatch adds a "Run workflow" button (and API/CLI trigger) so a workflow can be started manually, with typed inputs (string, boolean, choice, environment). Inputs are read from inputs.<name>. From the CLI: gh workflow run deploy.yml -f env=staging -f version=1.4.2. The workflow file must exist on the default branch for the button to appear.
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate