Interview Prep/CI/CD/GitHub Actions

How do you debug a failing GitHub Actions workflow?

IntermediateConceptGitHub Actions
Answer

Re-run with debug logging (the "Enable debug logging" checkbox, or set secret/variable ACTIONS_STEP_DEBUG=true), lint locally with actionlint, reproduce with act for simple workflows, and add diagnostic steps that print toJSON(github) (never secrets). For runner-side problems, a tmate-style SSH session action can be used on a non-sensitive repo. gh run view <id> --log-failed pulls only failing step logs from the CLI.

All CI/CD questions

More on GitHub Actions