This repository provides a Dockerized self-hosted GitHub Actions runner based on a Linux image with x64 architecture.
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 <token>
with a valid GitHub token.
To build the Docker image locally, navigate to the repository directory and run
docker build -t actions-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
Use this YAML in your workflow file for each job
runs-on: self-hosted
The following environment variables can be configured.
Name | Description | Default value |
---|---|---|
REPO_URL |
The URL of the GitHub repository where the runner will be registered. | - |
TOKEN |
A GitHub token with permissions to register the runner. Can be found on Repo Settings > Actions > Runners > New self-hosted runner. | - |
RUNNER_VERSION |
The version of the GitHub Actions runner to download. | 2.322.0 |
CHECK_HASH |
Set to true to enable hash validation (requires specifying corresponding RUNNER_HASH hash value). |
true |
RUNNER_HASH |
The SHA256 hash for the specified runner version for validation. Only used if the CHECK_HASH is true |
b13b7848... the entire value can be found in the Dockerfile |
This project is licensed under the MIT License.
Sergey Torshin @torshin5ergey