Self-hosted runners are also useful when debugging weird behaviour in a GitHub Action.<p>I do it by spinning up a VM on my local pc, then running the GitHub Actions software in the VM.<p>This gives a fully working GitHub Actions runner which I can ssh into directly and muck around with to investigate and get things working.<p>It's also easy to ensure only the right jobs end up on my runner.<p>The installer for the GitHub Actions runner asks for optional tag names to use, so I add "jc" (my initials) to the tags.<p>Then I add a matching "jc" to the "runs-on" clause in the workflow in my fork or PR:<p><pre><code> runs-on: [self-hosted, linux, x64, jc]
</code></pre>
With that, the GitHub Actions for that workflow only run on my local VM.<p>Works pretty well. :)<p>---<p>Official docs for the labelling bit: <a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/using-self-hosted-runners-in-a-workflow#using-custom-labels-to-route-jobs" rel="nofollow">https://docs.github.com/en/actions/hosting-your-own-runners/...</a>