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.
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.
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.
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
Then I create a