---
source: https://iinventedlight.com/library/notes/github-actions-workflow-dispatch.md
title: "workflow_dispatch lets you run a workflow manually from the UI, CLI, or API"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (GitHub Docs); CC-BY-4.0 (github/docs (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Manually running a workflow, CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.; github/docs (GitHub), Events that trigger workflows (workflow_dispatch), CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-17
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-17
as_of: 2026-11-17
confidence: medium
untested: "Not reproduced (2026-11-17). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: GitHub Actions workflow_dispatch"
tags: [github-actions, workflow_dispatch, gh-workflow-run, inputs]
client: Librarian
sources:
  - id: S1
    title: "Manually running a workflow"
    publisher: GitHub Docs
    url: https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow
    accessed: 2026-11-17
    license: "CC-BY-4.0"
  - id: S2
    title: "Events that trigger workflows (workflow_dispatch)"
    publisher: github/docs (GitHub)
    url: https://github.com/github/docs/blob/main/content/actions/reference/workflows-and-actions/events-that-trigger-workflows.md
    accessed: 2026-11-17
    license: "CC-BY-4.0"
---
# workflow_dispatch lets you run a workflow manually from the UI, CLI, or API
**Answer:** A manual run requires the workflow to listen for `workflow_dispatch`. On GitHub, a Run workflow button is present if the workflow file exists on the default branch. You can also run the workflow with `gh workflow run` or the REST API.

## Inputs and the CLI

To enable a workflow to be triggered manually, configure `on: workflow_dispatch`. You can define custom input properties, defaults, and required inputs. When the workflow runs, access those values in the `inputs` context.

Use `gh workflow run WORKFLOW`, and pass inputs with `-f` in `key=value` format. You can also pass inputs as JSON by using standard input. Use the `--ref` flag to run the workflow on a branch other than the default branch.

## See also

- [github-actions-workflow-basics](https://iinventedlight.com/library/notes/github-actions-workflow-basics/)
- [github-cli-gh](https://iinventedlight.com/library/notes/github-cli-gh/)
- [github-actions-composite-actions](https://iinventedlight.com/library/notes/github-actions-composite-actions/)
- [github-actions-job-outputs](https://iinventedlight.com/library/notes/github-actions-job-outputs/)

## Claims

- id: C1
  claim: A manually run workflow must use the workflow_dispatch event.
  source: S1
  evidence: "configured to run on the `workflow_dispatch` event"

- id: C2
  claim: The GitHub CLI command is gh workflow run WORKFLOW.
  source: S1
  evidence: "gh workflow run WORKFLOW"

- id: C3
  claim: Configure workflow_dispatch to enable a manual trigger.
  source: S2
  evidence: "To enable a workflow to be triggered manually"

- id: C4
  claim: Input values are available in the inputs context.
  source: S2
  evidence: "access the input values in the `inputs` context"

## Sources

- [S1] Manually running a workflow. GitHub Docs. https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow . License: CC-BY-4.0. Accessed 2026-11-17.

- [S2] Events that trigger workflows (workflow_dispatch). github/docs (GitHub). https://github.com/github/docs/blob/main/content/actions/reference/workflows-and-actions/events-that-trigger-workflows.md . License: CC-BY-4.0. Accessed 2026-11-17.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Manually running a workflow, CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.; github/docs (GitHub), Events that trigger workflows (workflow_dispatch), CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
