forked from SanderKnape/github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
697b4ee
commit 6f0184c
Showing
1 changed file
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
# 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](https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners). A Kubernetes Deployment file is also included that you can use to deploy this container to your Kubernetes cluster. | ||
|
||
This repository contains a Dockerfile that builds a Docker image suitable for running a [self-hosted GitHub runner](https://sanderknape.com/2020/03/self-hosted-github-actions-runner-kubernetes/). 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](https://hub.docker.com/repository/docker/sanderknape/github-runner/general). | ||
|
||
More information can be found in my blog post: [Running self-hosted GitHub Actions runners in your Kubernetes cluster | ||
](https://sanderknape.com/2020/03/self-hosted-github-actions-runner-kubernetes/) | ||
## Building the container | ||
|
||
`docker build -t github-runner .` | ||
|
||
## Features | ||
|
||
* Repository runners | ||
* Organizational runners | ||
* Labels | ||
* Graceful shutdown | ||
|
||
## Examples | ||
|
||
Register a runner to a repository. | ||
|
||
`docker run -e GITHUB_OWNER=username-or-organization -e GITHUB_REPOSITORY=my-repository -e GITHUB_PAT=[PAT] github-runner` | ||
|
||
Create an organization-wide runner. | ||
|
||
`docker run -e GITHUB_OWNER=username-or-organization -e GITHUB_PAT=[PAT] github-runner` | ||
|
||
Set labels on the runner. | ||
|
||
`docker run -e GITHUB_OWNER=username-or-organization -e GITHUB_REPOSITORY=my-repository -e GITHUB_PAT=[PAT] -e RUNNER_LABELS=comma,separated,labels github-runner` | ||
|
||
|