This is the third and final article of the series Trying DigitalOcean App Platform which is part of DigitalOcean App Platform Hackathon. This is also my official submission for the hackathon.
What I built
GitHub Actions self-hosted runner docker on DigitalOcean App Platform worker.
Currently, we cannot deploy a new app that only has the worker. So you need to create a new app with a service then delete that service and create a worker.
Category Submission:
Random Roulette
Screenshots
GitHub settings
DigitalOcean dashboard
Description
This is a self hosted GitHub Actions runner for deploying to DigitalOcean App Platform. You will get the simplicity of automated cluster deployment and scaling by DigitalOcean App Platform.
It will register and remove itself automatically when DigitalOcean App Platform start and stop the container. You can vertical scale or horizontal scale your runner. If you do a horizontal scale (Pro plan only), all runners will be automatically registered to GitHub.
Link to Source Code
ThewBear / do-actions-runner
Self-hosted actions runner on DigitalOcean App Platform
Permissive License
MIT License
Background
I built this app to trying out DigitalOcean App Platform worker and GitHub Actions self-hosted at the same time.
The DigitalOcean App Platform worker is a running server-side code that is not internet-accessible. Because workers can not accept HTTP requests, they are only suitable for doing background tasks, such as queue processing.
The GitHub Actions self-hosted runners offer more control of software tools than GitHub-hosted runners provide. With self-hosted runners, you can choose to increase processing power or memory, install custom software, and choose an operating system not offered by GitHub-hosted runners. In our case, this is done by modifying Dockerfile
and scaling the component.
How I built it
I built it by looking through existing resources about self-hosted actions runner docker. Here are some of them:
- GitHub Actions self-hosted runners on Google Cloud
- Running self-hosted GitHub Actions runners in your Kubernetes cluster
- Deploying Self-Hosted Github Actions Runners with Docker
- myoung34/docker-github-actions-runner
- samber/github-actions-runner
- actions/virtual-environments
Then I create a Dockerfile
and entrypoint.sh
.
Top comments (0)