LinuxCommandLibrary

gh-workflow

Manage GitHub Actions workflows from the command line

TLDR

List workflows

$ gh workflow list
copy
View workflow details
$ gh workflow view [workflow-name]
copy
Run a workflow
$ gh workflow run [workflow-name]
copy
Enable a workflow
$ gh workflow enable [workflow-name]
copy
Disable a workflow
$ gh workflow disable [workflow-name]
copy

SYNOPSIS

gh workflow command [options]

DESCRIPTION

gh workflow manages GitHub Actions workflows from the command line. It provides control over workflow definitions including listing, viewing, triggering, and enabling or disabling workflows.
The run command triggers workflow_dispatch events, executing workflows on demand with optional input parameters. This enables manual CI runs and parameter-driven workflows from the terminal.

PARAMETERS

list

List workflow files.
view WORKFLOW
View workflow details.
run WORKFLOW
Trigger a workflow run.
enable WORKFLOW
Enable a workflow.
disable WORKFLOW
Disable a workflow.
-r REF, --ref REF
Branch or tag for workflow run.
-f FIELD=VALUE, --field FIELD=VALUE
Input parameters for workflow.
--help
Display help information.

CAVEATS

Workflow must have workflow_dispatch trigger for manual runs. Enable/disable requires admin access. Inputs must match workflow definition.

HISTORY

gh workflow was added to the GitHub CLI as part of comprehensive GitHub Actions integration, enabling complete workflow management from the terminal.

SEE ALSO

gh(1), gh-run(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community