Sign inSign up

torshin5ergey/actions-runner

By torshin5ergey

•Updated over 1 year ago

Dockerized self-hosted GitHub Actions runner based on a Linux image with x64 architecture

Image
Integration & delivery
Developer tools
Web servers
1

516

torshin5ergey/actions-runner repository overview

⁠Custom GitHub Actions Runner in Docker

A Dockerized self-hosted GitHub Actions runner⁠ based on a Linux image with x64 architecture.

⁠Quickstart

REPO_URL=<https://github.com/username/repo>
REPO_NAME=$(basename -s .git "$REPO_URL")
docker run -d \
  --name "actions-runner-$REPO_NAME" \
  -e REPO_URL="$REPO_URL" \
  -e TOKEN="<token>" \
  torshin5ergey/actions-runner:latest

Replace https://github.com/username/repo⁠ with your repository URL and with a valid GitHub token.

⁠Setup and Run

⁠Step 1: Pull the image
docker pull torshin5ergey/actions-runner:latest
⁠Step 2: Setup the runner

To run GitHub Actions Runner in Docker, you need to provide your repository URL and a token for authentication. Replace <https://github.com/username/repo> and <token> with your data.

REPO_URL=<https://github.com/username/repo>
REPO_NAME=$(basename -s .git "$REPO_URL")

docker run -d \
  --name "actions-runner-$REPO_NAME" \
  -e REPO_URL="$REPO_URL" \
  -e TOKEN="<token>" \
  torshin5ergey/actions-runner:latest
⁠Step 3: Use the runner

Use this YAML in your workflow file for each job

runs-on: self-hosted

⁠Docker container configuration

⁠Environment variables

The following environment variables can be configured.

NameDescriptionDefault value
REPO_URLThe URL of the GitHub repository where the runner will be registered.-
TOKENA GitHub token with permissions to register the runner. Can be found on Repo Settings > Actions > Runners > New self-hosted runner.-
RUNNER_VERSIONThe version of the GitHub Actions runner to download.2.322.0
CHECK_HASHSet to true to enable hash validation (requires specifying corresponding RUNNER_HASH hash value).true
RUNNER_HASHThe SHA256 hash for the specified runner version for validation. Only used if the CHECK_HASH is trueb13b7848... the entire value can be found in the Dockerfile

For more details, check out the Dockerfile on GitHub⁠.

⁠License

This project is licensed under the MIT License⁠.

⁠Author

Sergey Torshin @torshin5ergey⁠

Tag summary

Content type

Image

Digest

sha256:a62106218…

Size

429.8 MB

Last updated

over 1 year ago

docker pull torshin5ergey/actions-runner