Docs
ghdebug runs your GitHub Actions workflows locally with nektos/act. When a run: step fails, the job pauses and you get a shell inside the container, with the same working directory and environment the step had.
Install
You need Docker (running), act 0.2.60 or later, and Python 3.9+.
pipx install git+https://github.com/oiwdis/ghdebug.git
ghdebug --version
Or from a clone: pip install .. If you have not set platforms in ~/.actrc, ghdebug maps ubuntu-latest to catthehacker/ubuntu:act-latest (about 1.6 GB on first pull).
30-second demo
git clone https://github.com/oiwdis/ghdebug.git
cd ghdebug/examples/demo-repo
ghdebug steps # list the numbered steps
ghdebug run # step 4 "Test" fails, then a shell opens
# inside the shell:
# showstep
# echo $BUILD_ID
# sed -i 's/Hello world/hello, world/' greet.sh && rerun
# exit, then press r
# the workflow finishes green
After fixing the code on your machine instead:
sed -i 's/Hello world/hello, world/' greet.sh
ghdebug run --from-step 4
git checkout greet.sh # put the demo bug back
Commands
| Command | What it does |
|---|---|
ghdebug run [event] | Run the workflow with act and pause on a failing run: step. event defaults to push. |
ghdebug run --from-step N -j JOB | Skip steps before N. Reuses the kept container and restores $GITHUB_ENV / $GITHUB_PATH from the last run. |
ghdebug run --no-pause | Plain act behaviour. The container is still kept for ghdebug shell. |
ghdebug run --no-shell | On failure, ask retry / continue / fail without opening a shell first. |
ghdebug run -- <act args> | Anything after -- goes to act, for example -- --secret-file .secrets. |
ghdebug steps | List jobs and step numbers. |
ghdebug shell [-j JOB] [--step N] | Open a shell in a kept job container, with env and cwd as of step N. |
ghdebug clean | Remove the containers act and ghdebug kept. |
-W path/to/workflow.yml picks a workflow when the repo has more than one. -j job picks a job. For scripts and CI, set GHDEBUG_ON_RESUME=retry|continue|fail to answer the resume prompt automatically.
Limitations
- Only
run:steps pause in place. A failinguses:action can be inspected afterwards withghdebug shell. --from-stepcannot restore step outputs or caches and artifacts from skipped steps.pwsh,powershell, andcmdsteps are not wrapped. Steps withcontinue-on-error: truedo not pause.- When jobs run in parallel, their logs are held back while you are in a shell.
- act itself is not GitHub. Some actions, services, and runner images behave differently.
- Tested end-to-end on Linux. macOS should work with Docker Desktop, Colima, or OrbStack. Windows has only been considered through WSL2.
The full README lives in the GitHub repository.