actbreak
A local breakpoint debugger for act. act runs
GitHub Actions workflows locally, but there's no way to pause mid-run and look
around. actbreak injects a real breakpoint into a workflow, waits for the job
container to reach it, and drops you into a live shell inside the still-running
container. Resume when you're done, and the workflow keeps going.
Zero runtime dependencies. Python 3.9+, stdlib only.
Status
Early / v0.1.0. Core injection and selection logic is unit tested; the
run/resume/clean orchestration against real act + Docker/Podman is covered by
a CI integration test rather than exercised in every environment this ships to.
Install
git clone https://github.com/munzzyy/actbreak
cd actbreak
pip install -e .
Once it's on PyPI: pipx install actbreak.
Requires act on PATH, and one of Docker or Podman.
Usage
actbreak run <workflow.yml> --break-before <step>
actbreak run <workflow.yml> --break-after <step>
actbreak run <workflow.yml> --break-on-failure
actbreak resume
actbreak clean
<workflow.yml> is either a path to a workflow file, or a bare name looked up
under .github/workflows/.
A step selector is either a step's name: value, or <job>:<index> to select
by zero-based position (use this for steps with no name:).
run flags
| Flag | Meaning |
|---|---|
--break-before STEP |
pause immediately before STEP runs |
--break-after STEP |
pause immediately after STEP runs |
--break-on-failure |
if act exits nonzero, attach to the last job container for post-mortem |
--job JOB |
disambiguate a multi-job workflow |
--runtime {docker,podman,auto} |
container runtime to use (default: auto-detect) |
--no-attach |
don't exec a shell automatically; print the attach command and hold |
--act-arg ARG |
extra argument passed through to act (repeatable) |
-v, --verbose |
print the injection/act commands being run |
Examples
actbreak run ci.yml --break-before "Run tests"
actbreak run ci.yml --job build --break-before build:2
actbreak run ci.yml --break-after "Build" --no-attach
actbreak run ci.yml --break-on-failure
How it works
- Finds the target workflow and, using the given job/step selector, resolves an exact step in it.
- Copies the workflow to a temp file and splices a synthetic step in immediately before or after the target, using line-based text injection (never a YAML parse-and-re-serialize round trip; see below for why).
- The injected step drops a sentinel file (
/tmp/actbreak/hold) and blocks on it inside the container. - Runs
act -W <temp copy> --reuseso the container stays alive after the run "finishes" (i.e. hangs at the hold). - Polls
docker ps/podman psfor the job's container, then for the sentinel file, to know the breakpoint has been hit. - Execs an interactive shell into the container. Exiting the shell (or
running
actbreak resume) deletes the sentinel and lets the job continue.
Why not just parse the YAML?
Because round-tripping a workflow through a generic YAML library corrupts it.
PyYAML's default loader coerces an unquoted on: key to the boolean True
under YAML 1.1 rules, and any generic dumper throws away comments, quoting
style, and anchors. actbreak never deserializes the file. It scans for
jobs:, then the target job, then its steps: list, using indentation alone,
and splices in new lines at the right point. Every other byte in the file is
untouched.
Development
pip install -e ".[dev]"
python -m unittest
pytest
The integration pytest marker (pytest -m integration) runs a real
act + Docker/Podman end-to-end test; it's auto-skipped unless both are on
PATH, which in practice means it only runs in CI.
License
Prosperity Public License 3.0.0 — free for noncommercial use, thirty-day trial for commercial use. See LICENSE. Contributions come in under the Blue Oak Model License; see CONTRIBUTING.md.
Metadata
Release files for actbreak 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| actbreak-0.1.0.tar.gz | 27.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| actbreak-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.2 kB
Release files / actbreak-0.1.0.tar.gz
| Download URL | actbreak-0.1.0.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d784503f8c064517c16c2023da06d6eb70a1fc8465caa211533fb3045ffd76c
|
|
BLAKE2b-256 checksum How to use checksums |
2842d3e45375183ecf5b9dc9c526b8a609583dac71838a038617cf711ce804d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / actbreak-0.1.0-py3-none-any.whl
| Download URL | actbreak-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcb9b7eeae5e08ae21176b1dc820b55279dff94ecd536eec8974a095fa0826d5
|
|
BLAKE2b-256 checksum How to use checksums |
84627b417b6207ba662b095819e95c0ccef75ca0f062d394b208bbbc9b213aa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|