A red cross on a workflow run means clicking through to the run, then the job, then expanding the right step in a web page that loads a few thousand lines. For the usual question, which step broke and why, there is a shorter route from the terminal.
gh run view 12345 --log-failed
The help text says --log-failed views the log for any failed steps in a run or a specific job. Leave out the run id and gh lets you pick a run interactively. A few related flags from the same page:
--logprints the full log of a run or a job.-j,--joblimits the view to one job id.-a,--attemptpicks an attempt number of the run.--exit-statusexits with a non-zero status if the run failed.
The last one is useful in a script, and the manual has this example:
gh run view 0451 --exit-status && echo "run pending or passed"
Note the wording of that echo: a run that is still pending also counts as not failed.
Caveats from the help text. Because of platform limitations, gh may not always be able to match jobs with their logs when it fetches them as a zip. It then tries to fetch the log of each job separately, which is slower, and if more than 25 job logs are missing, the operation fails with an error. Some log lines may also not belong to a specific step, and then the step shows up as UNKNOWN STEP.
You need gh auth login first. This was not run against a live repository; it follows the help text and the manual.
Further reading: gh run view manual
Going deeper: Moving on from hdtv: how to export your TV show list to Trakt.tv