Skip to content

EverseDevelopment/GHAction.Runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions Self-Hosted Runner

Ubuntu 22.04 Docker image for running a GitHub Actions self-hosted runner.

Files

File Description
Dockerfile Ubuntu 22.04 image with runner v2.331.0 pre-installed
entrypoint.sh Configures and starts the runner at container startup

Build

cd runner
docker build -t gh-runner .

Run

Pass the registration token at runtime — never bake it into the image.

docker run -d \
  --name gh-runner-REPO \
  --restart unless-stopped \
  -e RUNNER_TOKEN=<your-token> \
  gh-runner

Environment Variables

Variable Default Required Description
RUNNER_TOKEN Yes GitHub registration token
RUNNER_URL https://github.com/XXXX/XXXX No Repository or organization URL
RUNNER_NAME hostname No Display name shown in GitHub
RUNNER_LABELS self-hosted No Comma-separated runner labels

Get a Registration Token

Tokens expire after 1 hour. Generate one using either method:

GitHub UI: Settings → Actions → Runners → New self-hosted runner

GitHub CLI:

gh api repos/organization/repo/actions/runners/registration-token \
  --method POST \
  --jq .token

Use in Workflows

jobs:
  build:
    runs-on: self-hosted

Stop & Remove

The runner de-registers itself from GitHub automatically when the container stops.

docker stop gh-runner
docker rm gh-runner

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published