Sign inSign up

heywoodlh/github-actions-runner

By heywoodlh

Updated 1 day ago

Ubuntu GitHub Actions Runner container

Image
0

7.1K

heywoodlh/github-actions-runner repository overview

An Ubuntu 24.04 based GitHub Actions runner.

Build resources are here: https://github.com/heywoodlh/dockerfiles/tree/master/github-actions-runner

GitHub Action used to build this is here: https://github.com/heywoodlh/actions/blob/master/.github/workflows/github-actions-runner-buildx.yml

Requirements

There are two options for authentication with GitHub:

  1. A repository token (preferred)
  2. Personal access token (not recommended, requires a lot of permissions)
Repository token

Get a repository token by going to your repository and selecting Settings > Actions > Runners > New self-hosted runner

In the "Configure" section, there should be an example command containing the token that looks like this:

# Create the runner and start the configuration experience
$ ./config.sh --url SOMEREPO --token SOMETOKEN

Note the token, and provide it as a REPO_TOKEN environment variable.

Personal access token

Issue a Personal Access Token with the following permissions:

  • repo (everything)
  • workflow
  • admin:org (everything)

Use the Personal Access Token as the value for the GH_TOKEN environment variable. If REPO_TOKEN is set, it will be used over GH_TOKEN environment variable.

Usage with docker-compose

This example assumes you will use docker-in-docker:

services:
  actions-runner:
    image: docker.io/heywoodlh/github-actions-runner:latest
    container_name: actions-runner
    hostname: my-actions-runner
    restart: unless-stopped
    privileged: true # Remove if you don't need DinD
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock # Remove if you don't need DinD
    environment:
      - GH_OWNER=username
      - GH_REPO=repositoryname
      - REPO_TOKEN=sometoken
      #- GH_TOKEN=sometoken

Tag summary

Content type

Image

Digest

sha256:a3178b531

Size

677.7 MB

Last updated

1 day ago

docker pull heywoodlh/github-actions-runner