GitHub Actions Runner on AWS Fargate

April 23, 2020

Sometimes it's nice to do something, maybe a little indecisive, just because it's possible. That's the subject of this blog.

It is just two days ago when I asked on Twitter:

Has anyone deployed their self-hosted #GitHub Actions runners to #AWS #Fargate? – @nikovirtala

Apparently, no one did, since also Google didn't provide me any hits. 🀷

So, what was all this buzz about and what I actually wanted to achieve?

GitHub Actions is a software workflow automation tool with CI/CD capability from GitHub. In November 2019, GitHub open-sourced the runner component and added support to run workflows on self-hosted machines.

AWS Fargate, on the other hand, is a serverless compute engine for containers and one of the best computing inventions of this decade.

I want to use AWS Fargate to host my GitHub Actions runners!

Since both technologies are familiar to me, I decided to pull strings together. As an exception to my regular routines, I chose to use AWS Cloud Development Kit as a deployment tool instead of a safe and sound Terraform.

After a few hours of work, I came up with this: a fully functional example of executing self-hosted GitHub Actions runner on AWS Fargate! https://github.com/nikovirtala/github-actions-runner

It’s still raw, but most importantly, it proves the concept works! If you have any questions or comments, poke me on Twitter or GitHub, I'm all ears. :)

Ps. I right before finishing this post, I noticed that yesterday we also got support for Organization level self-hosted runners. It only means that my newly created side project just got a new feature too! πŸ€“


Profile

Niko Virtala is a modern technology enthusiast, Cloud Gardener, and DevOps Consultant at Polar Squad. He is also the father of two magnificent girls, husband, indie music lover, guitarist, and photographer. He loves simplicity and values a great developer experience. Follow him on Twitter