Use this when a GitHub Actions workflow fails or does not start.
GitHub Actions Troubleshooting
Troubleshoot GitHub Actions by reading the step logs, enabling debug logging (ACTIONS_STEP_DEBUG), checking the trigger and path filters, permissions of GITHUB_TOKEN, secrets availability on forks and runner labels.
1. Failures: YAML errors, permissions (GITHUB_TOKEN), missing secrets (forks), runner issues, rate limits.
2. Read failed logs.
3. Enable debug logging.
4. Check permissions block.
5. Fix and re-run.
event → workflow → job → step → error
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
gh run list --limit 20Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
Known-good is a run for the expected commit/event is created, jobs leave queued state, required steps complete successfully and the original artifact/deployment/check is produced; broken state is the expected run is absent, stuck queued/waiting, cancelled unexpectedly or ends failed with a reproducible first failing step. Run-list state shows GitHub orchestration status only, but it does not show the deployed workload or external dependency is healthy after a successful workflow.
Step 2 Common mistakes Narrow the fault
- Not enabling debug logging (
ACTIONS_STEP_DEBUG).
Step 3 Observation-driven branch and next-check logic Narrow the fault
If no expected run exists, inspect trigger/ref/path conditions; if a run exists but stays queued/waiting, inspect runner labels, concurrency and environment approvals; if a job starts and fails, inspect the first failed step, its exit code and secret/permission context.
- Read the first failing step.
- Enable debug logging.
- Check permissions and secrets.
gh run view <id> --log-failed— failed step logs- Re-run with debug (ACTIONS_STEP_DEBUG secret/variable) — verbose
actionlint— config errors
ReferenceHow it works1 section · depth on demand
How it works
GitHub Actions Troubleshooting is governed by workflow trigger evaluation, run creation, job scheduling, runner assignment and step execution. GitHub evaluates event/ref/path filters before creating a run; jobs then wait on permissions, environments, concurrency and runner availability before individual steps execute in the runner context. Repository permissions, secrets, environment approvals, runner health and external services are independent things to check. The important state separation is that a workflow file can be valid while no run is triggered, and a created run can remain queued even though no job step has failed.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Troubleshooting GitHub Actions starts with the run log: expand the failing step, check the exact command and error, and compare with the last successful run. Most failures fall into a few categories.
| Symptom | Likely cause | Check |
|---|---|---|
| Job queued forever | No runner matches labels | Runner status, labels, runner group access |
| Workflow does not start | Trigger/branch filter, YAML error | Actions tab warnings, actionlint |
| Secret empty | Fork PR, wrong environment, wrong name | Environment, event type |
| Permission denied (403) | GITHUB_TOKEN permissions | permissions: block |
| Works locally, fails in CI | Missing tool/version, path, time zone | Runner image, setup steps |
Enable debug logging by setting the repository secret or variable ACTIONS_STEP_DEBUG to true, and re-run failed jobs with debug logging from the UI.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in GitHub Actions > GitHub Actions Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax · confidence 94%