commands.sh

gh workflow

all

List, view, and run GitHub Actions workflows.

More info →

Options (4)

-w, --webboolean

View a specific workflow in the default browser

Example: gh workflow view {{id|workflow_name|filename.yml}} {{[-w|--web]}}
-y, --yamlboolean

Display the YAML definition of a specific workflow

Example: gh workflow view {{id|workflow_name|filename.yml}} {{[-y|--yaml]}}
-r, --refboolean

Display the YAML definition for a specific Git branch or tag

Example: gh workflow view {{id|workflow_name|filename.yml}} {{[-r|--ref]}} {{branch|tag_name}} {{[-y|--yaml]}}
boolean

List workflow files (use `--all` to include disabled workflows)

Example: gh workflow {{[ls|list]}}

Examples (8)

Interactively select a workflow to view the latest jobs for

View a specific workflow in the default browser

gh workflow view id|workflow_name|filename.yml [-w|--web]

Display the YAML definition of a specific workflow

gh workflow view id|workflow_name|filename.yml [-y|--yaml]

Display the YAML definition for a specific Git branch or tag

gh workflow view id|workflow_name|filename.yml [-r|--ref] branch|tag_name [-y|--yaml]

List workflow files (use `--all` to include disabled workflows)

gh workflow [ls|list]

Run a manual workflow with parameters

gh workflow run id|workflow_name|filename.yml --raw-field param1=value1 --raw-field param2=value2 ...

Run a manual workflow using a specific branch or tag with JSON parameters from `stdin`

echo '{"param1": "value1", "param2": "value2", ...}' | gh workflow run id|workflow_name|filename.yml [-r|--ref] branch|tag_name

Enable or disable a specific workflow

gh workflow enable|disable id|workflow_name|filename.yml
made by @shridhargupta | data from tldr-pages