Skip to content

GitHub-hosted runners vs self-hosted runners

In the context of GitHub Actions, runners are the virtual machines or servers responsible for executing jobs defined within workflows^[github-action.md]. This concept represents a fundamental configuration choice when setting up automation.

GitHub-hosted runners

GitHub-hosted runners are virtual machines provided and maintained by GitHub^[github-action.md]. These are specified in workflow files using standard labels such as ubuntu-latest^[github-action.md]. Because they are managed by GitHub, users do not need to worry about the underlying operating system maintenance or runner infrastructure.

Self-hosted runners

Self-hosted runners refer to the alternative approach where the workflow execution environment is managed by the user rather than GitHub^[github-action.md]. This option allows for the use of custom environments or specific hardware configurations that are not available in the default GitHub-hosted offerings.

Configuration

Runners are typically configured using the runs-on key within a workflow definition^[github-action.md]. This is distinct from other workflow syntax elements like the event trigger (on), the workflow itself (workflows), and the tasks (jobs), but it determines the environment where those tasks will run^[github-action.md].

Sources

^[github-action.md]