Using self-hosted runners in a workflow

To use self-hosted runners in a workflow, you can use labels to specify the runner type for a job.

In this article

About self-hosted runner labels

Labels allow you to specify the type of runner for a job. When you add a self-hosted runner to a repository, some labels are added automatically:

  • self-hosted: Default label applied to all self-hosted runners.
  • linux, windows, or macos: Applied depending on operating system type.
  • x86, x64, ARM, or ARM64: Applied depending on architecture type.

Using self-hosted runners in a workflow

To specify a self-hosted runner for your job, configure runs-on in your workflow file with self-hosted runner labels.

All self-hosted runners have the self-hosted label, and you can select any self-hosted runner by providing only the self-hosted label. Alternatively, you can use self-hosted in an array with additional labels, such as labels for a specific operating system or system architecture, to select only the runner types you specify.

Example using any self-hosted runner

runs-on: self-hosted

Example using macOS self-hosted runners

runs-on: [self-hosted, macos]

Example using ARM64 Linux self-hosted runners

runs-on: [self-hosted, linux, ARM64]

For more information, see "Workflow syntax for GitHub Actions."

Ask a human

Can't find what you're looking for?

Contact us