workflow_dispatch is a GitHub Actions workflow trigger that enables manual execution from GitHub.com. Add it under on alongside other triggers such as push. section 4.1.1
A manually runnable workflow
name: Hello World on: workflow_dispatch: push: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Hello World run: echo "Hello World" After committing and pushing this YAML file, use the GitHub Actions interface to run the workflow manually. section 4.1.1
Listing 4.2 Hello World with GitHub Actions
name: Hello World
on:
workflow_dispatch:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Hello World
run: echo "Hello World"
Inspect the complete YAML workflow, including workflow_dispatch, push, the runner, checkout, and the command step. section 4.1.1
