Saving costs with self-hosted runners for GitHub Actions
Self-hosting GitHub Actions runners can provide more control over the environment and potentially reduce costs compared to using GitHub-hosted runners. Here are some solutions for setting up self-hosted runners.
Actions Runner Controller
The Actions Runner Controller β is a Kubernetes operator that automates the deployment and management of GitHub Actions self-hosted runners within a Kubernetes cluster. It handles the scaling and automatic updates of runners, making it a robust choice for teams already using Kubernetes. You can deploy it using Helm charts, and it supports both organization and enterprise runners.
To learn more about how to setup the Actions Runner Controller on Kubernetes, have a look at this article.
Philips Terraform module
Philips Terraform module β is another approach, leveraging the infrastructure-as-code methodology to manage GitHub Actions runners. This module allows you to provision self-hosted runners on AWS, using Terraform. Itβs a good option if you want to integrate your runner setup into a broader Terraform-managed infrastructure.
RunsOn
RunsOn (this site) is a newer and more streamlined solution for running GitHub Actions runners. It focuses on reducing costs and simplifying the setup process. RunsOn sets up a dedicated infrastructure in your own AWS account, providing a hassle-free way to deploy self-hosted runners without the need to manage servers or complex configurations. Itβs an excellent choice for teams looking to save on costs while avoiding the complexities of managing their infrastructure.
Rolling your own
For those who need a highly customized setup, rolling your own runners might be the best approach. This involves setting up a virtual machine or a physical server, installing the necessary software, and configuring it to connect with GitHub Actions. This method offers maximum control over the runner environment but requires more maintenance and setup effort.
Conclusion
Each of these solutions has its strengths and is suited to different organizational needs and technical environments. A comparison matrix is available here β. You can also look at alternative third-party providers that offer managed runners.