Repository navigation
v0.18.0
New: actrun export — Workflow to Shell Script Transpiler (Experimental)
Convert GitHub Actions workflows to standalone bash scripts.
actrun export .github/workflows/ci.yml # Sequential
actrun export .github/workflows/ci.yml --parallel # Parallel jobs with & + wait
actrun export .github/workflows/ci.yml --job lint # Single jobExpression resolution:
${{ env.VAR }}→$VAR${{ secrets.TOKEN }}→$SECRET_TOKEN${{ github.ref }}→$GITHUB_REF(20+ known mappings)${{ github.event.* }}→$(jq -r '.path' "$GITHUB_EVENT_PATH")${{ matrix.os }}→$MATRIX_OS${{ steps.id.outputs.key }}→$_STEP_ID_KEY${{ needs.job.outputs.key }}→$_NEEDS_JOB_OUT_KEY${{ needs.job.result }}→$_NEEDS_JOB_RESULT(success/failure)echo "key=val" >> "$GITHUB_OUTPUT"→_STEP_ID_KEY=valecho "KEY=val" >> "$GITHUB_ENV"→export KEY=val
jq-based expression helpers (contains, startsWith, endsWith, toJSON, fromJSON, hashFiles, format, join, success, failure, always, cancelled):
gha_contains() { [[ "$1" == *"$2"* ]]; }
gha_toJSON() { jq -n --argjson v "$(printenv | jq -Rs ...)" '$v'; }
gha_hashFiles() { cat "$@" 2>/dev/null | sha256sum | cut -d' ' -f1; }Structural features:
- Jobs as shell functions (
job_BUILD(),job_DEPLOY()) - Topological sort for dependency order
needsoutputs propagated via shell variables--parallel: layer-based concurrency with&+wait+ temp file IPC- Reusable workflows (
uses: ./path/to/callee.yml) inlined with inputs - Matrix defaults from first row
continue-on-error→|| trueworking-directory→pushd/popd- Origin comments:
# ← ${{ original }}on transformed lines
Action conversions:
| Action | Shell equivalent |
|---|---|
actions/checkout |
git clone / git fetch |
actions/setup-node |
Commented: mise use, fnm, nvm |
actions/setup-python |
Commented: mise use, uv, pyenv |
actions/upload-artifact |
cp -r to artifact dir |
actions/download-artifact |
cp -r from artifact dir |
actions/cache |
No-op comment |
docker://image |
docker run --rm |
Verified: 32/36 examples execute correctly via actrun export | bash
Export Snapshot Tests
just snapshot-export-update/just snapshot-export-verify- 16 examples × 2 variants (sequential + parallel) = 32 golden files
What's Changed
Full Changelog: v0.17.0...v0.18.0