1GH-WORKFLOW-RUN(1)             GitHub CLI manual            GH-WORKFLOW-RUN(1)
2
3
4

NAME

6       gh-workflow-run - Run a workflow by creating a workflow_dispatch event
7
8
9

SYNOPSIS

11       gh workflow run [<workflow-id> | <workflow-name>] [flags]
12
13
14

DESCRIPTION

16       Create a workflow_dispatch event for a given workflow.
17
18
19       This  command will trigger GitHub Actions to run a given workflow file.
20       The given workflow file must support a workflow_dispatch  'on'  trigger
21       in order to be run in this way.
22
23
24       If  the  workflow  file supports inputs, they can be specified in a few
25       ways:
26
27
28              • Interactively
29
30              • via -f or -F flags
31
32              • As JSON, via STDIN
33
34
35
36

OPTIONS

38       -F, --field <key=value>
39              Add a string parameter in key=value format, respecting @ syntax
40
41
42       --json Read workflow inputs as JSON via STDIN
43
44
45       -f, --raw-field <key=value>
46              Add a string parameter in key=value format
47
48
49       -r, --ref <string>
50              The branch or tag name which contains the version of  the  work‐
51              flow file you'd like to run
52
53
54

OPTIONS INHERITED FROM PARENT COMMANDS

56       -R, --repo <[HOST/]OWNER/REPO>
57              Select another repository using the [HOST/]OWNER/REPO format
58
59
60

EXAMPLE

62              # Have gh prompt you for what workflow you'd like to run and interactively collect inputs
63              $ gh workflow run
64
65              # Run the workflow file 'triage.yml' at the remote's default branch
66              $ gh workflow run triage.yml
67
68              # Run the workflow file 'triage.yml' at a specified ref
69              $ gh workflow run triage.yml --ref my-branch
70
71              # Run the workflow file 'triage.yml' with command line inputs
72              $ gh workflow run triage.yml -f name=scully -f greeting=hello
73
74              # Run the workflow file 'triage.yml' with JSON via standard input
75              $ echo '{"name":"scully", "greeting":"hello"}' | gh workflow run triage.yml --json
76
77
78
79
80

SEE ALSO

82       gh-workflow(1)
83
84
85
86                                   Jun 2022                 GH-WORKFLOW-RUN(1)
Impressum