Working repository with reference examples for building self-hosted runners for GitHub Actions.
The contents of this repository are not meant to be run in a production environment and are for reference example only. This is still an active Work In Progress and likely should not be used by anyone, for any reason.
Builds a GitHub Actions Runner container 🚢.
This repository has a reference docker example which contains a Dockerfile
for building an image along with a docker-compose
configuration for local testing.
The image configuration built from this example is published to GitHub Packages and can be pulled rather than performing a local build for quick testing.
The container image reference:
- Is meant for organization or repository scoped runners. See Docs for additional information.
-
Create
docker/.env
file using the reference docker/.env.exampleGHRUNNER_ORGANIZATION='' # Optionally specify a Repository # GHRUNNER_REPOSITORY='' GHRUNNER_ACCESS_TOKEN='' GHRUNNER_LABELS="self-hosted,Linux,x64,dependabot" # Specify the base GitHub URL if not using github.com # GHRUNNER_GITHUB_BASE_URL='https://myGHES.com'
This is a similar example to the docker
example, but with the dind
(Docker in Docker) feature disabled. This is useful for running the runner in a container that does not have access to the host Docker daemon so no Docker dependencies are required or installed on the container.
The actions-runner example contains a Dockerfile
for building an image with the GitHub Actions Runner installed. This directory is an example of only building the runner image, such as for use with Actions Runner Controller, as it does not contain a start script or configuration for running the runner.