Skip to content

Latest commit

 

History

History

base

Base Actions Runner

Quay org

The base actions runner is meant to be minimal. It is build from fedora:35, and contains the GitHub Actions Runner and all its dependencies. At image build time, the latest runner version is downloaded, and the runner self-updates when it is connected to GitHub.

On OpenShift, containers run as a dynamically assigned user ID You can read about this on the OpenShift blog. This image contains logic to assign that user ID to the runner user and make sure the home directory and other required files are have the necessary permissions.

The entrypoint.sh acquires a GitHub Self Hosted Runner token using your GitHub PAT. The token is used to register the runner with GitHub, and connect to start listening for jobs on the organization or repository you specify.

Some basic CLI tools are installed in addition to what's in the parent Fedora image.

  • curl
  • findutils (find)
  • git
  • hostname
  • jq
  • openssl
  • procps (ps, pgrep)
  • which

Building your own runner image

You can create your own runner image based on this one, and install any runtimes and tools your workflows need.

  1. Create your own Containerfile, with FROM quay.io/redhat-github-actions/runner:<tag>.
  2. Edit the Containerfile to install and set up your tools, environment, etc.
    • If you have to use root in your Containerfile, use USER root and convert back to USER $UID before the end of the Containerfile.
    • The UID environment variable is set in the base Containerfile.
    • Do not override the ENTRYPOINT.
  3. Build and push your new runner image.
  4. Install the OpenShift Action Runner Chart. Set the value runnerImage to your image, and runnerTag to your tag.

Remember to pull the base image before running the container build to make sure you are building from an up-to-date image.

For example, one could build a runner image that includes a Node runtime in just four lines.

FROM quay.io/redhat-github-actions/runner:latest as runner

USER root
RUN dnf module install -y nodejs:14/default
USER $UID

Just like that, we have created the Node runner image.