Package Layout
Server Mode Data Flow
Local Mode Data Flow
MicroVM Lifecycle
Each CI job runs inside an ephemeral CloudHypervisor microVM. Independent jobs (noneeds: dependency between them) run in parallel, each in its own VM. The number of concurrent VMs is auto-detected from host RAM or set via VM_MAX_PARALLEL.
/workspace.
Networking uses a TAP device attached to a Linux bridge (br0) with NAT, giving VMs full internet access for downloading dependencies.
Expression Engine
Theinternal/expr/ package implements a full GitHub Actions expression evaluator:
- Lexer — tokenizes expression contents inside
${{ }} - Parser — recursive descent producing an AST
- Evaluator — tree-walking with GitHub Actions truthiness rules
- Interpolation — finds
${{ }}delimiters, evaluates, splices results
github.sha), operators (==, !=, &&, ||, !), functions (contains, startsWith, format, join, toJSON, fromJSON, success, failure, always, cancelled), index access (matrix['os']).
Runner Events
The runner communicates via a buffered Go channel of typed events:| Event | When |
|---|---|
WorkflowStarted | Run begins |
JobStarted | A job begins execution |
StepStarted | A step begins execution |
StepOutput | A line of stdout/stderr from a step |
StepFinished | A step completes (with exit code) |
JobFinished | A job completes (success/failure/skipped) |
WorkflowFinished | All jobs done |
RunStore, which notifies SSE subscribers for the web dashboard and builds the log output for the GitHub Checks API.
GitHub Integration
Athanor uses two GitHub APIs: Checks API (requires GitHub App) — creates a check run per workflow with full Markdown-formatted log output. Each job and step appears with its status and output in a code block. GitHub displays this in the check run details view. Commit Statuses (works with PAT) — sets a singleathanor status on the commit. Always set as a fallback.
Authentication for the Checks API uses standard GitHub App JWT flow:
- Sign a JWT with the app’s RSA private key
- Exchange it for a short-lived installation token
- Use the token for API calls
- Cache and refresh automatically
Job Scheduling
Jobs are sorted using Kahn’s algorithm for topological ordering, producing levels of parallelizable jobs. Matrix jobs are expanded into virtual jobs before sorting.Action Support
Theinternal/action/ package handles uses: steps:
- Resolve — parse
owner/repo@version,./local/path, ordocker://image - Builtins —
actions/checkouthas a built-in shim (git checkout) - Cache — clone action repos to
~/.cache/athanor/actions/ - Metadata — parse
action.ymlfor inputs, outputs, runs - Composite — execute composite action steps inline
- Node — execute Node.js actions via
node(if available)