Workflow Dispatch
ELI5 — The Vibe Check
Workflow Dispatch is the 'run this manually' button for GitHub Actions. Instead of waiting for a push or PR, you click a button and pass it inputs. Need to deploy a specific branch? Re-run a migration? Workflow Dispatch. It's the remote control for your CI/CD.
Real Talk
The workflow_dispatch event in GitHub Actions allows manual triggering of workflows via the GitHub UI, API, or CLI. It supports typed inputs (string, boolean, choice, environment) that are passed to the workflow, enabling on-demand operations like deployments, data migrations, or maintenance tasks.
Show Me The Code
on:
workflow_dispatch:
inputs:
environment:
type: choice
options: [staging, production]
dry_run:
type: boolean
default: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "Deploying to ${{ inputs.environment }}"
When You'll Hear This
"We trigger production deploys via workflow_dispatch — no accidental pushes." / "The dispatch input lets us choose which environment to deploy to."
Related Terms
Deployment Protection Rules
Deployment Protection Rules are the bouncers at your production club.
GitHub Actions
GitHub Actions is CI/CD built right into GitHub. Push code, run tests, deploy — all from YAML files in your repo. No separate CI server needed.
GitHub Environments
GitHub Environments are like VIP rooms for your deployments.