GitHub Actions Kubernetes Runner

Some time ago I had the Idea to build an GitHub Actions Runner which runs on Kubernetes.
Basically I wanted to build a Runner which works a bit like the GitLab K8s Runner, basically the following:

  • Containerized Agent
  • Deployment via Helm Chart
  • For each Job a Pod gets scheduled

The biggest Issue currently is the GitHub Actions API isn’t nowhere documented or not event public? So currently it is really hard to start building such Runner.
Are there any plans on creating a Documentation for the GitHub Actions API or even plans for building such runner which I described?
Thanks!

2 Likes

Thanks for your feedback.
Normally we install self-hosted runner according to the following steps:

  1. Create a folder under the drive root, Download the latest runner package and Extract the installer. Such as:
// Create a folder under the drive root
$ mkdir actions-runner; cd actions-runner 
// Download the latest runner package
$ Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip -OutFile actions-runner-win-x64-2.273.0.zip 
// Extract the installer
$ Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/actions-runner-win-x64-2.273.0.zip", "$PWD")
  1. Use this API to create a registration token for an organization.
  2. Create the runner and start the configuration experience with the registration token from step2 and then run the Agent. Such as:
// Create the runner and start the configuration experience
$ ./config.cmd --url https://github.com/{Your organization}/{Your project} --token {Your token} 
// Run it!
$ ./run.cmd

By the way, there is an existing repo here that may be related to your needs, please check it and hope it helps.

Hi @niconbw! Thanks for your feedback.

Let me provide you with some more details. Our main idea was to achieve the following:

  1. A containerized & self-hosted GitHub Action Runner on Kubernetes. Basically what the kubeact does.
  2. Instead of running the job inside the Action Runner Pod, we thought about a Runner that is aware of Kubernetes and schedules Pod based on a defined Container image. Basically what Azure DevOps does with Container Jobs but as Pods.

A good example of this is the GitLab Runner Kubernetes Executor.

Our idea was to build such a runner, but due to missing documentation of the API, we aren’t able to do so. The API documentation only includes how to register a runner. Nothing further.

1 Like

Hi @nmeisenzahl
I did not find further API as you said. I recommend that you can directly report your requests here. That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your idea. Thanks

Hi @niconbw! Thanks for the hint! I will contact them.

/cc @StiviiK