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.
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.
macos: Applied depending on operating system type.
ARM64: Applied depending on architecture type.
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.
runs-on: [self-hosted, macos]
runs-on: [self-hosted, linux, ARM64]
For more information, see "Workflow syntax for GitHub Actions."