![Forrest logo](/images/logo.png)
gh-workflow:tldr:49e0d
gh-workflow: Run a manual workflow using a specific branch or tag with JSON parameters from `stdin`.
$ echo '${{"param1": "value1", "param2": "value2", ---}}' | gh workflow run ${select} --ref ${select1}
try on your machine
The given command is using the command-line tool gh
to perform a GitHub workflow run with specific parameters.
Here's a breakdown of the command:
echo '${{"param1": "value1", "param2": "value2", ---}}'
: This portion is using theecho
command to print the provided JSON payload. It represents the inputs or parameters for the GitHub workflow. It contains key-value pairs, where"param1"
and"param2"
are parameter names and"value1"
and"value2"
are their corresponding values. The---
represents additional parameters that may exist but were omitted for brevity.|
: The|
character is a pipe operator that allows the output of the previous command to be used as input for the next command.gh workflow run
: This is thegh
command to trigger the execution of a GitHub workflow.${select}
: It is a placeholder indicating that a variable or argument should be substituted here. The value for${select}
should be provided during command execution. It likely represents the name or ID of the GitHub workflow to run.--ref ${select1}
: This argument specifies the Git reference (e.g., branch, tag, commit) for the workflow run. Like${select}
,${select1}
is a placeholder that should be replaced with an actual value when executing the command.
Together, this command leverages echo
to provide a JSON payload containing parameters, and then executes the GitHub workflow using gh workflow run
, passing the provided parameters and Git reference.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.