This repository contains a Dockerfile that builds a Docker image suitable for running a [self-hosted GitHub runner].
You can build this image yourself, or use the Docker image from the Docker Hub.
docker build -t github-runner .
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] \
rkdixit3/github-runnerRegister a runner with github token.
docker run --name github-runner \
-e GITHUB_OWNER=username-or-organization \
-e GITHUB_REPOSITORY=my-repository \
-e GITHUB_TOKEN=[github.token] \
rkdixit3/github-runnerCreate an organization-wide runner.
docker run --name github-runner \
-e GITHUB_OWNER=username-or-organization \
-e GITHUB_PAT=[PAT] \
rkdixit3/github-runnerSet labels on the runner.
docker run --name github-runner \
-e GITHUB_OWNER=username-or-organization \
-e GITHUB_REPOSITORY=my-repository \
-e GITHUB_PAT=[PAT] \
-e RUNNER_LABELS=comma,separated,labels \
rkdixit3/github-runnerInstall additional tools on the runner.
docker run --name github-runner \
-e GITHUB_OWNER=username-or-organization \
-e GITHUB_REPOSITORY=my-repository \
-e GITHUB_PAT=[PAT] \
-e ADDITIONAL_PACKAGES=firefox-esr,chromium \
rkdixit3/github-runnersecret.yaml
apiVersion: v1
kind: Secret
metadata:
name: github-secret
stringData:
GITHUB_PAT: ghp_XXXXXXXXXXXXkubectl apply -f ./secret.yaml