Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a github action from command line

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?

like image 772
Noam Freeman Avatar asked Jun 27 '26 08:06

Noam Freeman


1 Answers

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

like image 102
Noam Freeman Avatar answered Jun 30 '26 03:06

Noam Freeman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!