How to run a github action from command line
Asked Answered
O

1

7

I need to run some Github action on my repository, but the Web-UI gives me some trouble with branch selection.

How can i run action by command line?

Olympe answered 29/12, 2022 at 8:16 Comment(0)
O
4

The Github Command Line tool has many options for managing actions.

to run a workflow, simply run gh workflow run which will let you interactively select the workflow and fill in parameters.

The only non-interactive parameter is the ref to run the workflow on, which could be specified by

gh workflow run --ref <YOUR_REF>

almost any other param could be specified in the command args, but most useful is the workflow itself, so if i want to run the "publish_staging" workflow on the "rc-1.3.5" branch, i can just run

gh workflow run publish_staging.yml --ref rc.1.3.5

Olympe answered 29/12, 2022 at 8:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.