DEV Community

loading...

Actions Runner on DigitalOcean App Platform

thewdhanat profile image Thew Dhanat ・3 min read

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.

Deploy to DO

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

Actions self-hosted settings

DigitalOcean dashboard

DigitalOcean App Platform 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.

Horizontally scaled runners are registered automatically

Link to Source Code

GitHub logo 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:

Then I create a Dockerfile and entrypoint.sh.

Additional Resources/Info

Buy Me A Coffee

Discussion (0)

pic
Editor guide