← All procedures
gh.workflow.run
Start a workflow run (a workflow_dispatch event) on a branch or a tag, with the inputs of the workflow
CLI- Package
- @procedures/gh · README
- Path
["gh","workflow","run"]- CLI
mark gh workflow run --workflow <string>- As data
{"$proc":["gh","workflow","run"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/gh/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["gh","workflow","run"], { workflow: "<workflow>" });
console.log(JSON.stringify(result));From the command line
$ mark gh workflow run --workflow <string>
As data, in a program
{
"$proc": ["gh", "workflow", "run"],
"input": { "workflow": "<workflow>" }
}Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"repo": {
"description": "The repository as owner/name (default: the repository of the folder)",
"type": "string",
"pattern": "^[\\w.-]+\\/[\\w.-]+$"
},
"cwd": {
"description": "The folder where gh runs",
"type": "string"
},
"timeoutMs": {
"description": "The time limit of the command, in milliseconds",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"workflow": {
"type": "string",
"minLength": 1,
"description": "The name, the file name or the id of the workflow"
},
"ref": {
"description": "The branch or the tag (default: the default branch)",
"type": "string",
"minLength": 1
},
"inputs": {
"description": "The inputs of the workflow, each one as -f key=value",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"workflow"
]
},
"output": {
"type": "object",
"properties": {
"workflow": {
"type": "string",
"description": "The workflow"
},
"ref": {
"description": "The branch or the tag",
"type": "string"
},
"url": {
"description": "The URL of the new run, when gh prints it",
"type": "string"
},
"run": {
"description": "The id of the new run, when gh prints its URL",
"type": "number"
}
},
"required": [
"workflow"
],
"additionalProperties": false
}
}