One flaky test job fails, nine others passed. Rerunning everything wastes minutes and runner time.
Find the run, then rerun only what failed:
gh run list --status failure --limit 5
gh run rerun 1234567890 --failed
--failed reruns the failed jobs plus the jobs they depend on, so the outputs they need are there again. Add --debug to turn on debug logging for the rerun, which is the quickest way to get more detail on a failure you can’t reproduce.
To rerun a single job, use -j with the job’s ID. The help warns that the number in the browser URL of a job is not that ID. Get the right one like this:
gh run view 1234567890 --json jobs --jq '.jobs[] | {name, databaseId}'
I’d pair it with gh run watch so you see the rerun finish without switching windows.
A rerun uses the same commit and the same workflow file as the original run. If you fixed the workflow or the code, push a new commit instead, because a rerun will happily fail the same way. And if the run is older than the retention window, GitHub may refuse to rerun it at all.
Further reading: gh run rerun (GitHub CLI manual), gh run view (GitHub CLI manual)
Going deeper: Moving on from hdtv: how to export your TV show list to Trakt.tv