Visit site

A Terraform module for hosting your own runner for CI/CD on Digital Ocean to run jobs in your GitHub Actions workflows. ๐Ÿš€

What is Doact? ๐Ÿš€

Doact is a Terraform module to automate the deployment and hosting process of your own runners on Digital Ocean cloud to run jobs in your GitHub Actions workflows. It makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub.

Why Doact? ๐Ÿง

Doact sets up a self-hosted runner on the cloud. Self-hosted runners offer more control of hardware, operating system, and software tools than GitHub-hosted runners provide. With self-hosted runners, you can choose to create a custom hardware configuration with more processing power or memory to run larger jobs, install software available on your local network, and choose an operating system not offered by GitHub-hosted runners. You can read more about self-hosted runner here.

Note: Currently doact supports machines with Linux X64 architecture.

Prerequisites โœ…


Ensure you have Terraform installed. A handy tool to manage your Terraform version is tfenv.

On macOS it is simple to install tfenv using brew.

$ brew install tfenv

Next install a Terraform version.

$ tfenv install <version>

Note: doact is written to work with Terraform 0.11.x - it will not run on 0.12.x

DigitalOcean Personal Access Token

This module uses DigitalOcean (DO) provider is used to interact with the resources supported by DigitalOcean. The provider needs to be configured with the proper credentials before it can be used. Check Terraform DigitalOcean Provider for more detailed usage and examples. To generate a personal access token, follow this tutorial.

Note: Access tokens require repo scope for private repos and public_repo scope for public repos.

Github personal access token

The module requires Github personal access token for the admin access to the repository and to configure the runner. You can create a personal access token by following this tutorial.

SSH Public Key

Your SSH Pulic key is required to give you full access to the Droplet on which your runner is hosted. Droplets are virtual machines that run on top of virtualized hardware. You can generate your own SSH Public Key by following this tutorial.

Usage โš™๏ธ

Update the values inside terraform.tfvars file for better experience.

Run the following commands to use the module:

To initialize Terraform:

$ terraform init

To inspect the resources that will be created:

$ terraform plan

To deploy the runner :

$ terraform apply

To delete the runner :

$ terraform destroy

Note: The above command will use the default values defined inside file. You can change the values if required.


The ssh-keys module has been added with Docat v2.x.x to make it easier to deploy your SSH Key on Digital Ocean. Just Paste your SSH Public Key inside the file and peroform the above actions.

Contributing ๐Ÿป

I welcome pull requests, bug fixes and issue reports. Before proposing a change, please discuss your change by raising an issue.

Maintainer ๐Ÿ˜Ž

Kumar Saurabh


Apache License 2.0 ยฉ Kumar Saurabh

Was this helpful?
Leave a comment

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Publish your Tool on Community

Have you created an Integration, API Wrapper, Service, or other Tool that helps developers build on DigitalOcean? Help users find it by listing it in Community Tools.

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow โ€” whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel