Sign inSign up

olivercullimore/docker-github-runner

By olivercullimore

Updated over 5 years ago

Image
0

229

olivercullimore/docker-github-runner repository overview

GitHub Runner

Credits:


GitHub allows developers to run GitHub Actions workflows on your own runners. This Docker image allows you to create your own runners on Docker.

Important notes

  • GitHub recommends that you do NOT use self-hosted runners with public repositories, for security reasons.
  • Organization level self-hosted runners are supported (see environment variables).

Usage

Basic usage

Use the following command to start listening for jobs:

docker run -it --name my-runner \
    -e RUNNER_NAME=my-runner \
    -e GITHUB_ACCESS_TOKEN=token \
    -e RUNNER_REPOSITORY=githubreponame \
    -e RUNNER_REPOSITORY_OWNER=githubuser \
    tcardonne/github-runner

Environment variables

The following environment variables allows you to control the configuration parameters.

NameDescriptionRequired/Default value
RUNNER_REPOSITORYThe runner will be linked to this repository URLRequired if RUNNER_ORGANIZATION is not provided
RUNNER_REPOSITORY_OWNERThe runner will be linked to this repository ownerRequired if RUNNER_ORGANIZATION is not provided
RUNNER_ORGANIZATIONThe runner will be linked to this organization.Required if RUNNER_REPOSITORY and RUNNER_ORGANIZATION is not provided
GITHUB_ACCESS_TOKENPersonal Access Token. Used to dynamically fetch a new runner token (recommended, see below).Required.
RUNNER_WORK_DIRECTORYRunner's work directory"_work"
RUNNER_NAMEName of the runner displayed in the GitHub UIHostname of the container
RUNNER_LABELSExtra labels in addition to the default: 'self-hosted,Linux,X64' (based on your OS and architecture)""
RUNNER_REPLACE_EXISTING"true" will replace existing runner with the same name, "false" will use a random name if there is conflict"true"
RUNNER_VERSIONVersion of GitHub Action Runner to useLatest available

Runner Token

In order to link your runner to your repository/organization, you need to provide a GITHUB_ACCESS_TOKEN, containing a Personal Access Token. This token will be used to dynamically fetch a new runner token, as runner tokens are valid for a short period of time. * For a single-repository runner, your PAT should have repo scopes. * For an organization runner, your PAT should have admin:org scopes.

Tag summary

Content type

Image

Digest

Size

484.2 MB

Last updated

over 5 years ago

docker pull olivercullimore/docker-github-runner