Trigger and monitor a GH workflow. If the workflow fails, the agent will offer to perform root cause analysis using the gha-analyze skill.
SKIP MODE SELECTION
$0 — Workflow file name (e.g., deploy.yml)$1 — Branch (e.g., main)$2 — Optional workflow inputs in key=value format (space-separated)If $0 (workflow file) or $1 (branch) are missing, output:
"[!] ERROR: Workflow file and branch are required." Usage:
/gha-run <workflow-file> <branch> [inputs]
Then stop.
Run via Bash:
git remote get-url origin
Parse owner and repo from the URL:
[email protected]:owner/repo.githttps://github.com/owner/repo.gitUse mcp__github__actions_run_trigger with:
method: run_workflowowner: detected ownerrepo: detected repoworkflow_id: $0ref: $1inputs: if $2 is provided, parse key=value pairs into an objectOutput: [+] Triggered: $0 on $1
Wait 5 seconds via Bash (sleep 5), then use mcp__github__actions_list with:
method: list_workflow_runsowner: detected ownerrepo: detected reporesource_id: $0workflow_runs_filter.branch: $1per_page: 1Extract the id from the first result. If none found, output an error and stop.
Poll using mcp__github__actions_get with:
method: get_workflow_runowner: detected ownerrepo: detected reporesource_id: run ID from Step 4Check the status field:
completed: proceed to Step 6sleep 15) and poll againOutput the following deterministic report and do not analyze or interpret:
Workflow: <name>
Status: <conclusion>
Run ID: <run_id>
URL: <html_url>
If conclusion is not success, automatically invoke the gha-analyze skill with the run ID — do not ask first.