June 1, 2020

Setting Up GitHub Actions Self-Hosted Runners

Today we set up a self-hosted runner for the newly-out-of-beta GitHub Actions. The process was relatively smooth, but since we were setting up a runner on Windows, as usual, there were a couple of bumps.

Bump #1: Custom Actions

We were setting up a runner to test the Terraform action first, and quickly discovered something that does not immediately stand out in the self-hosted runner documentation: to use most actions, you must install Nodejs.

Luckily, that was one command away:

choco install nodejs

Bump #2: The Shell

As our luck would have it, the Terraform action uses the bash shell by default for all platforms (including Windows). On Windows, GitHub Actions uses the "Git Bash" shell. We already had that installed, so we were in good shape, right?


At least when installed via Chocolatey, the Git Bash shell does not get added to the PATH by default. You'll need to add the below to your PATH:

C:\Program Files\Git\bin

With these two small changes, you should find using your new Windows self-hosted runner with GitHub Actions to be much more straightforward!