Menu

Debug GitHub Actions from Your Terminal with gh
🖼️

Debug GitHub Actions from Your Terminal with gh

DEV Community·Andrea Liliana Griffiths·6 months ago
#94Pk6rPE
#githubactions#ghcli#cicd#workflow#enter
Reading 0:00
15s threshold

Debug GitHub Actions from Your Terminal with gh

If your GitHub Actions debugging workflow starts with opening three browser tabs, it is probably slower than it needs to be.

Most CI failures do not require the Actions UI at all. The gh CLI gives you the core loop from your terminal: find the broken run, read the failure, retry it, and watch it live. Once you get used to it, going back to the browser feels clumsy.

Find the run

gh run list --limit 10

Enter fullscreen mode

Exit fullscreen mode

Start here. This shows recent runs, their status, and what triggered them.

If a workflow has been stuck in queued forever, you will see it immediately. If you want to script against the output, add --json and skip the copy-paste routine entirely.

Read only what failed

gh run view <run-id> --log-failed

Enter fullscreen mode

Exit fullscreen mode

This is the command I was missing.

You do not always need the full log dump. You usually need the failing step.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.