Github self-hosted runner Dockerfile and Kubernetes configuration

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.

For more info, check gihub actions from here

Building the container


docker build -t github-runner .

Features

  • Repository runners
  • Organizational runners
  • Labels
  • Graceful shutdown
  • Auto-update after the release of a new version

Examples

Register a runner to a repository.


docker run --name github-runner \
     -e GITHUB_OWNER=username-or-organization \
     -e GITHUB_REPOSITORY=my-repository \
     -e GITHUB_PAT=[PAT] \
     gcr.io/$GCP_PROJECT/github-runner