We provide a variety of self-hosted runner configurations. Choose the one that best suits your project's needs (each runner is labelled with size
, OS
and architecture
):
Size | OS | Architecture | Instance Type | AMI |
---|---|---|---|---|
4xlarge | linux | x64 | c5.4xlarge | github-runner-ubuntu-jammy-amd64-202307110949-default built with default.pkrvars |
2xlarge | linux | x64 | c5.2xlarge | github-runner-ubuntu-jammy-amd64-202307110949-default built with default.pkrvars |
xlarge | linux | x64 | c5.xlarge or m5.xlarge | github-runner-ubuntu-jammy-amd64-202307110949-default built with default.pkrvars |
large | linux | x64 | c5.large or m5.large | github-runner-ubuntu-jammy-amd64-202307110949-default built with default.pkrvars |
2xlarge | windows | x64 | c5.2xlarge | github-runner-windows-core-2022-202310200742-default built with default.pkrvars |
xlarge | windows | x64 | c5.xlarge or m5.xlarge | github-runner-windows-core-2022-202310200742-default built with default.pkrvars |
Follow these simple steps to integrate our runners into your repository:
Insert the full repository name where you plan to utilize the self-hosted runners into the repository_allowlist
of the desired runner type within the runners.tf file. Proceed with creating a PR and await for your changes to be merged and applied.
Default
runner group in your organization.job.runs-on
parameter. For instance, runs-on: [self-hosted, linux, x64, linux-x64-default]
, runs-on: [self-hosted, windows, x64, windows-x64-default]
.If you're wondering about the security implications of using self-hosted runners in public repositories, consider these pointers:
To expand our catalog with a new runner type, simply add a new runner type definition object to the for_each
object in runners.tf. Note that the name (key in for_each
object) must be unique. Certain names are disallowed (e.g., linux
, windows
, x64
, arm64
, etc.). Please refer to the following subset of runners module inputs for the supported object inputs.
In the initial design, webhook calls were managed by an API Gateway which directed the traffic to the corresponding webhook lambda. Each runner type had a unique API Gateway and webhook lambda.
However, GitHub Apps permit only one webhook endpoint, which with the original setup meant we'd need as many GitHub Apps as runner types.
Our solution to this issue is to replace the multiple API Gateways with a single API Gateway and an Application ELB. This new setup ensures that the public-facing API Gateway receives webhook calls, retrieves workflow_job.labels
from the request body, adds it into the X-GitHub-Workflow_Job-Labels
header, and forwards the modified request to the ALB. The ALB scans for a webhook lambda capable of handling events that match the labels from X-GitHub-Workflow_Job-Labels
. If it finds one, it forwards the request to that lambda. If it doesn't, it responds with a 404.
IMPORTANT: This revised setup requires all runner types to possess unique extra_labels
and to have runner_enable_workflow_job_labels_check
set to true
.