GitHub Actions in Action: Continuous integration and delivery for DevOps cover
welcome to this free extract from
an online version of the Manning book.
to read more
or

6 Self-hosted runners

 

This chapter covers

  • Setting up self-hosted runners
  • Securely configuring your runners
  • Using ephemeral runners
  • Choosing autoscaling options
  • Setting up autoscaling with Actions-Runner-Controller

In chapter 5, we saw how we can use GitHub-hosted runners, when they are useful, as well as how billing works for those hosted runners. You can also install your own runners in your own environments, which are referred to as self-hosted runners. Creating self-hosted runners gives you full control over their execution environment, like placing it inside of the company network or adding specific hardware or software capabilities. Self-hosted runners can also be beneficial from a cost perspective, since you do not need to pay for any action minutes for jobs that run on self-hosted runners. There is, of course, a cost associated with hosting, setup, and system administrative tasks you will have to complete to keep the environments you host the runners on up to date and secure.

6.1 Setting up self-hosted runners

6.1.1 Runner communication

6.1.2 Queued jobs

6.1.3 Updating self-hosted runners

6.1.4 Available runners

6.1.5 Downloading actions and source code

6.1.6 Runner capabilities

6.1.7 Self-hosted runner behind a proxy

6.1.8 Usage limits of self-hosted runners

6.1.9 Installing extra software

6.1.10 Runner service account

6.1.11 Pre- and post-job scripts

6.1.12 Adding extra information to your logs

6.1.13 Customizing the containers during a job

6.2 Security risks of self-hosted runners

6.3 Single-use runners

6.3.1 Ephemeral runners

6.3.2 Just-in-time runners

6.4 Disabling self-hosted runner creation

6.5 Autoscaling options

6.5.1 Autoscaling with Actions Runner Controller

6.5.2 Communication in ARC

6.5.3 ARC monitoring

Summary