HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gh workflow — List, view, and run GitHub Actions workflows. More information: <https://cli.github.com/manual/gh_wo

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandrunandgithubclilistviewgh workflow

Problem

How to use the gh workflow command: List, view, and run GitHub Actions workflows. More information: <https://cli.github.com/manual/gh_workflow>.

Solution

gh workflow — List, view, and run GitHub Actions workflows. More information: <https://cli.github.com/manual/gh_workflow>.

Interactively select a workflow to view the latest jobs for:
gh workflow view


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}}

Code Snippets

Interactively select a workflow to view the latest jobs for

gh workflow view

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]}}

Context

tldr-pages: common/gh workflow

Revisions (0)

No revisions yet.