liveBook · Manning

Workflow_dispatch

As explained in Road to Kubernetes

workflow_dispatch is a GitHub Actions workflow trigger that permits manual execution from the GitHub interface.

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

How Road to Kubernetes covers it

How deep it goes
Defines the trigger and demonstrates its placement in YAML, but defers other runner operating systems and advanced configuration.
Examples
Uses a Hello World workflow that checks out code and runs an echo command.
What it assumes
Assumes a GitHub repository and basic ability to create, commit, and push a workflow YAML file.
What you can do after
Operate/configure it via GitHub Actions by adding the trigger to YAML and launching the workflow from GitHub.com.
How it connects
Connects GitHub Actions workflows with YAML, push triggers, jobs, runners, and workflow steps.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.