Auto-scaling self-hosted runners
In this recipe, we’ll be building on the previous recipe so that we have a solution that automatically starts a new instance of the ephemeral Docker container every time a new workflow is triggered. We’ll use a GitHub webhook for that.
Getting ready…
Make sure you still have the simple-ubuntu-runner
Docker image we created in the previous recipe on your machine or GitHub Codespaces.
How to do it…
- Go to https://github.com/settings/apps and click on New GitHub App.
- Set GitHub App Name to
auto-scale-runners
and Homepage URL to the URL of the repository you are using (see Figure 4.6):
Figure 4.6 – Setting the name and URL for the new app
- Skip the Identifying and authorizing users and Post installation section and proceed to Webhook.
- Open another browser tab, go to https://smee.io, and click on Start new channel. Copy the Webhook Proxy URL value.
- Go back...