Skip to main content
Blaxel can act as a self-hosted GitHub Actions runner. Each workflow job runs inside an ephemeral micro-VM that is spun up on demand and discarded when the job finishes. The Blaxel GitHub App receives workflow_job events from GitHub and automatically launches your job.
This tutorial assumes that you have a Python project containing unit tests and a GitHub Actions workflow that runs those unit tests using pytest.

Prerequisites

  • A Blaxel account and workspace
  • A GitHub repository containing a Python project with tests
  • The Blaxel CLI (bl) installed and authenticated

1. Create the Dockerfile

The Dockerfile defines the micro-VM filesystem. A good starting point is the catthehacker Ubuntu image, which includes most tools found on GitHub-hosted runners. Here is an example for a Python test runner:
You can install additional tools or set environment variables using standard RUN, COPY, and ENV instructions. When you are ready to use a different image, edit the Dockerfile and redeploy.

2. Create the entrypoint script

The Dockerfile references an entrypoint script (start.sh) that starts Docker, fetches the JIT config from Blaxel and starts the GitHub Actions runner:

3. Create blaxel.toml

The blaxel.toml file defines the job configuration. This example uses ephemeral volumes and targets the GitHub repositories this runner is allowed to serve:
The repositories field lists the GitHub repositories this runner is allowed to pick up jobs from. The format is owner/repo.

4. Deploy the job

Deploy the job to Blaxel:
Due to the large size of the image, the build process can take up to 40 minutes in some cases.

5. Install the Blaxel GitHub App

  1. Log in to the Blaxel Console.
  2. Navigate to Hosting > Jobs > <your-job-name> > Settings.
  3. Scroll to the GitHub Runner section. It should show as Active.
  4. Click Edit, then click +.
  5. Follow the instructions to authorize and install the Blaxel GitHub App on the repository.
  6. Select the repository and click Save.

6. Redeploy the job

7. Use the runner in your GitHub Actions workflow

In any GitHub Actions workflow, set runs-on to <workspace>/<job-name> to target your Blaxel runner:
Each time this workflow runs, Blaxel spins up a fresh ephemeral micro-VM, executes the job, and discards the VM when it finishes.

Resources

Jobs reference

Learn more about Blaxel Jobs and configuration options.

blaxel.toml reference

Full reference for all blaxel.toml fields.
Last modified on June 3, 2026