Sign inSign up

senither/github-actions-runner

By senither

•Updated about 3 years ago

A self-hosted GitHub actions runner that is scaleable for organizations.

Image
0

257

senither/github-actions-runner repository overview

⁠GitHub Actions Runner

This is a GitHub Actions runner that can be used to run self-hosted runners in a Docker container, it's scalable and can be used to run multiple runners in parallel for an organization.

The container is built on top of ubuntu:latest and the actions/runner-images⁠ installation scripts and comes pre-installed with all the tools specified in the 2204 specefication⁠ to run:

  • Common build tools
  • nvm
  • NodeJS
  • PHP
  • Docker
  • Docker Compose

This is done to help speed up workflow runs, other workflows will also work, but the workflow will need to install the missing tools on each run before being able to complete the workflow.

⁠Table of Contents

⁠Running

The container can be started by running the following command:

docker run -e ORGANIZATION=<your org> -e ACCESS_TOKEN=<your access token> -d senither/github-actions-runner

You'll have to substitute the <your org> for your organization name, and <your access token> for your fine-grained token⁠ with access to the organization with permissions to read and write to the organization's runners.

Alternatively, you could deploy the runners using Docker Compose with a file like the following:

version: '3.7'

services:
  runner:
    restart: unless-stopped
    image: senither/github-actions-runner
    environment:
      ORGANIZATION: ${ORGANIZATION}
      ACCESS_TOKEN: ${ACCESS_TOKEN}
    networks:
      - runner

# Networks to be created to facilitate communication between containers
networks:
  runner:
    driver: bridge

The environment variables can now be stored in a .env file next to the docker-compose.yml file, once that's created and setup you can now start the runners by running:

docker compose up -d
⁠Scaling

To scale the runner, run the following command:

docker-compose up -d --scale runner=2

Note: The --scale runner=2 argument can be changed to the number of runners you want to run in parallel.

Tag summary

Content type

Image

Digest

sha256:fa0315026…

Size

1.8 GB

Last updated

about 3 years ago

docker pull senither/github-actions-runner