run
Run a GitHub Actions workflow locally in an ephemeral container. This is useful for testing workflows without pushing to GitHub.
ephemerd run [workflow-file] [flags]Arguments
The workflow file is a positional argument, not a flag. If omitted, ephemerd searches the current directory’s .github/workflows/ for a workflow file.
Flags
| Flag | Description |
|---|---|
--job, -j | Run a specific job by name. If omitted, runs the first job in the workflow. |
Behavior
- Locate workflow – if no file is specified, calls
workflow.FindWorkflow()to auto-detect a workflow in.github/workflows/. - Parse workflow – reads the YAML workflow file and extracts job definitions.
- Select job – uses
--jobto pick a specific job, or defaults to the first job found. - Detect platform – inspects the job’s
runs-onlabels to determine the target OS (linux, windows, or macos). - Execute – runs the job in a local container using the container runtime.
WSL delegation on Windows
When running on a Windows host and the workflow targets Linux (based on runs-on labels), ephemerd automatically delegates execution to WSL. It:
- Creates a temporary WSL distro (
vm.NewRunDistro). - Translates the workflow path to an absolute path.
- Runs the Linux ephemerd binary inside WSL with the same workflow and job arguments.
- Destroys the WSL distro when the job completes.
Limitations
The local runner is a simplified execution environment. It does not support:
uses:steps – action references are not resolved or downloaded.services:– service containers are not started.secrets– GitHub secrets are not available.matrix– matrix strategies are not expanded.
Examples
# Run the default workflow in the current repo
ephemerd run
# Run a specific workflow file
ephemerd run .github/workflows/ci.yml
# Run a specific job from a workflow
ephemerd run .github/workflows/ci.yml --job build
# Short flag form
ephemerd run .github/workflows/ci.yml -j test