Skip to content

sdrwtf-labs/github-runner-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions Runner Deployment

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).

Architecture & GitOps Workflow

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).

Prerequisites

  • A working Docker host.
  • A GitHub Personal Access Token (Classic) with the admin:org scope (required to register an organization-level runner).

Deployment

  1. 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 .
  1. Configure the environment variables:
cp .env.example .env

Edit the .env file and insert your GitHub Personal Access Token.

  1. Start the service:
docker compose up -d
  1. Verify the registration:

Check the logs to ensure the runner successfully authenticated and is listening for jobs:

docker compose logs -f github-runner

About

Github runner setup

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors