Skip to content

maxpeterkaya/virtual-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized GitHub Runner

This project aims to simplify the process of making a self hosted action runner by allowing the user to neatly limit system resources, ensure constant up-time, and enhance scalability.

Roadmap

  • Generate custom name, if not provided one, with helpful information like host, region, and platform.
  • Structured logs (this is primarely just an idea and may not even be implemented)

Capabilities

Currently only Linux is supported, however Mac and Windows will be soon also supported.

  • Custom runner name (with randomly generated suffix to ensure uniqueness when horizontally scaling)
  • Automatic clean-up
  • Organization Runner
  • Personal Repository Runner

Getting Started

Per the docker-compose.yml file, use this template and fill-in the environment variables.

You can grab your runner token by going to your organization or personal repository Settings page, clicking on Actions and Runners, then New self-hosted runner.

Your token should in the Configure box. ex:

Configure

./config.sh --url https://github.com/maxpeterkaya/docker-runner --token YOUR_TOKEN

Copy YOUR_TOKEN then to the environment variable in the docker-compose file.

services:
  runner:
    image: ghcr.io/maxpeterkaya/docker-runner:latest
    restart: always
    environment:
      - OWNER= # This can be just an org or a repo, eg. ORG: github | REPO: maxpeterkaya/docker-runner
      - TOKEN= # This is your token you recieve from github when creating a new self hosted runner
      - NAME=  # This is your runner's name for easier distinction
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 512M
        reservations:
          cpus: '0.3'
          memory: 256M

Refer to the docker compose reference for more details about the resources configuration.

About

Run self-hosted GitHub Runners in docker with resource limitations and scalability.

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages