This repository contains a Dockerfile that builds a Docker image suitable for running a self-hosted GitHub runner. A Kubernetes Deployment file is also included that you can use as an example on how to deploy this container to a Kubernetes cluster.
You can build this image yourself, or use the Docker image from the Docker Hub.
docker build -t github-runner .
Get a token in your organisation settings -> Actions -> Add runner
Modify deployment.yml fields to target your repository and org token:
data:
# Base64 encoded of the token
TOKEN: <a base64 encoded token>
[...]
env:
- name: ORG_NAME
value: <YOUR ORG>
$ kubectl apply -f deployment.yml
Create an organization-wide runner.
docker run --name github-runner \
-e ORG_NAME=organization \
-e TOKEN=[token] \
michaelcoll/github-runner:latest
Set labels on the runner.
docker run --name github-runner \
-e ORG_NAME=organization \
-e TOKEN=[token] \
-e RUNNER_LABELS=comma,separated,labels \
michaelcoll/github-runner:latest
Content type
Image
Digest
sha256:5e00b15c9…
Size
336.7 MB
Last updated
about 4 years ago
docker pull michaelcoll/github-runner