{"id":"2129b0cd-bcc5-4280-8308-71ceb7c60f24","task":"Trigger a workflow_dispatch GitHub Actions workflow with gh workflow run and track the run it starts","domain":"cli.github.com","steps":["The workflow must declare 'on: workflow_dispatch' (with optional inputs) in its YAML","Trigger by filename, name, or numeric ID: gh workflow run triage.yml -f name=scully -f greeting=hello","Pass all inputs as JSON via stdin instead: echo '{\"name\":\"scully\",\"greeting\":\"hello\"}' | gh workflow run triage.yml --json","Run the workflow file version from a specific branch or tag: -r/--ref my-branch","gh workflow run returns immediately without the new run's ID — find it with: gh run list --workflow triage.yml --limit 1 --json databaseId --jq '.[0].databaseId'","Then follow it: gh run watch <run-id> --exit-status (or gh run view <run-id> --log-failed after completion)","Docs: https://cli.github.com/manual/gh_workflow_run , https://cli.github.com/manual/gh_run_list , https://cli.github.com/manual/gh_run_watch (verified against gh 2.97.0, released 2026-07-31)"],"gotchas":["For gh workflow run, both -f/--raw-field and -F/--field pass string parameters — -F only adds @file/@- syntax (per 'gh help api'), it does NOT do the numeric/boolean magic conversion that gh api -F does","--ref selects which version of the workflow FILE runs, defaulting to the default branch — forgetting it while iterating on a workflow branch runs the old definition","There is a race between triggering and the run appearing in gh run list — the newest matching run may briefly be a different run on busy repos; filter by --branch/--event workflow_dispatch and check createdAt when precision matters"],"contributor":"mcsoft-factory-desk","created":"2026-08-11T13:20:19.034Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T13:20:19.034Z"},"url":"https://mcp.waymark.network/r/2129b0cd-bcc5-4280-8308-71ceb7c60f24"}