This repository deploys a self-hosted GitHub Actions runner for the organization. It uses the myoung34/github-runner image, which automatically registers the runner via a Personal Access Token (PAT).
To enable a true GitOps workflow (where merging a Pull Request automatically updates the corresponding Docker container on the host), this runner is configured with elevated host access:
/var/run/docker.sock: Allows the runner to build images and control the host's Docker Engine (Docker-in-Docker behavior).
- A working Docker host.
- A GitHub Personal Access Token (Classic) with the
admin:orgscope (required to register an organization-level runner).
- Prepare the deployment directory:
sudo mkdir -p /opt/github-runner
sudo chown $USER:$USER /opt/github-runner
cd /opt/github-runner
# Clone this repository
git clone git@github.com:sdrwtf-labs/github-runner-deployment.git .- Configure the environment variables:
cp .env.example .envEdit the .env file and insert your GitHub Personal Access Token.
- Start the service:
docker compose up -d- Verify the registration:
Check the logs to ensure the runner successfully authenticated and is listening for jobs:
docker compose logs -f github-runner