.nh .TH "GT-WORKFLOW-RUN" "1" "Nov 2026" "gitea-cli" "gitea-cli Manual" .SH NAME gt-workflow-run - Dispatch a workflow .SH SYNOPSIS \fBgt workflow run [flags]\fP .SH DESCRIPTION Start a run of a workflow that has a workflow_dispatch trigger. .PP Inputs are checked against the inputs that the workflow declares: unknown inputs, missing required inputs and values that a choice, boolean or number input does not accept are refused. In a terminal, gt asks for missing required inputs, or for every input when none is given. .PP The workflow is looked up, like Gitea does, among the files in the first of .gitea/workflows and \&.github/workflows that exists on the branch or tag it runs on, so one that exists only on a branch runs with --ref. gt workflow list shows those of the default branch. .PP Without --ref, the workflow runs on the checked-out branch, which must be on the server, or on the default branch when the repository does not come from the working directory. .PP With --follow, the command exits with 5, like gt run watch, when the run completes without success, and with 3 when --timeout expires first. .SS ARGUMENTS .EX A workflow can be supplied as its file name ("ci.yml"), its file name without extension ("ci"), its path (".gitea/workflows/ci.yml") or its name ("CI"). .EE .SS JSON FIELDS .EX id, url .EE .SH OPTIONS \fB-f\fP, \fB--field\fP=[] Workflow input as \fBkey=value\fR (repeatable) .PP \fB--follow\fP[=false] Follow the logs of the run's jobs after dispatching it .PP \fB-h\fP, \fB--help\fP[=false] help for run .PP \fB-i\fP, \fB--interval\fP=2s Polling interval with --follow .PP \fB-r\fP, \fB--ref\fP="" Branch or tag to run the workflow on (default: the current or default branch) .PP \fB--timeout\fP=30m0s Maximum time to follow .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--csv\fP[=""] Output CSV with the specified comma-separated \fBfields\fR, or all fields .PP \fB--cwd\fP="" Working \fBdirectory\fR for repository discovery .PP \fB--debug\fP[=false] Log the method, URL, status, and duration of each HTTP request to stderr .PP \fB--host\fP="" Gitea instance \fBURL\fR, including any base path .PP \fB--interactive\fP[=false] Allow prompts with machine output .PP \fB-q\fP, \fB--jq\fP="" Filter JSON output using a jq \fBexpression\fR; implies --json .PP \fB--json\fP[=""] Output JSON with the specified comma-separated \fBfields\fR, or all fields .PP \fB--no-input\fP[=false] Disable prompts and implicit editor/browser interactions .PP \fB--remote\fP="" Git \fBremote\fR used for repository discovery .PP \fB-R\fP, \fB--repo\fP="" Select a repository as \fBOWNER/REPO\fR or URL .PP \fB--sudo\fP="" Perform API requests as this \fBuser\fR (requires an administrator account) .PP \fB--user\fP="" Account \fBname\fR on the selected instance .SH EXAMPLE .EX # run a workflow on the default or current branch $ gt workflow run CI # run it on a branch with inputs $ gt workflow run ci.yml --ref main -f target=production -f dry_run=false # run it and follow the logs of its jobs $ gt workflow run nightly --follow .EE .SH SEE ALSO \fBgt-workflow(1)\fP