Viewing available runners for a repository
Se você tiver repo: write
acesso a um repositório, poderá exibir uma lista dos executores disponíveis para o repositório.
-
Em GitHub, acesse a página principal do repositório.
-
No nome do repositório, clique em Ações.
-
Na barra lateral esquerda, na seção "Gerenciamento", clique em Executores.
-
Click the Self hosted tab at the top of the list of runners.
-
Review the list of available self-hosted runners for the repository. This list includes both self-hosted runners and runner scale sets created with Actions Runner Controller. For more information, see Actions Runner Controller.
-
Opcionalmente, para copiar o rótulo de um corredor para usá-lo em um fluxo de trabalho, clique em à direita do corredor e clique em Copiar rótulo.
Observação
Os proprietários de empresas e organizações e usuários com a permissão "Manage organization runners and runner groups" podem criar executores podem criar novos executores a partir desta página. Para criar um novo executores, clique em Novo executor no canto superior direito da lista de executores para adicionar executores ao repositório.
Para obter mais informações, confira Managing larger runners e Adding self-hosted runners. Para obter mais informações sobre funções de organização personalizadas, confira Sobre as funções da organização personalizadas.
Using default labels to route jobs
A self-hosted runner automatically receives certain labels when it is added to GitHub Actions. These are used to indicate its operating system and hardware platform:
self-hosted
: Default label applied to self-hosted runners.linux
,windows
, ormacOS
: Applied depending on operating system.x64
,ARM
, orARM64
: Applied depending on hardware architecture.
You can use your workflow's YAML to send jobs to a combination of these labels. In this example, a self-hosted runner that matches all three labels will be eligible to run the job:
runs-on: [self-hosted, linux, ARM64]
self-hosted
- Run this job on a self-hosted runner.linux
- Only use a Linux-based runner.ARM64
- Only use a runner based on ARM64 hardware.
To create individual self-hosted runners without the default labels, pass the --no-default-labels
flag when you create the runner. Actions Runner Controller does not support multiple labels.
Using custom labels to route jobs
You can create custom labels and assign them to your self-hosted runners at any time. Custom labels let you send jobs to particular types of self-hosted runners, based on how they're labeled.
For example, if you have a job that requires a specific type of graphics hardware, you can create a custom label called gpu
and assign it to the runners that have the hardware installed. A self-hosted runner that matches all the assigned labels will then be eligible to run the job.
This example shows a job that combines default and custom labels:
runs-on: [self-hosted, linux, x64, gpu]
self-hosted
- Run this job on a self-hosted runner.linux
- Only use a Linux-based runner.x64
- Only use a runner based on x64 hardware.gpu
- This custom label has been manually assigned to self-hosted runners with the GPU hardware installed.
These labels operate cumulatively, so a self-hosted runner must have all four labels to be eligible to process the job.
Using groups to route jobs
Neste exemplo, os executores do Ubuntu foram adicionados a um grupo chamado ubuntu-runners
. A chave runs-on
envia o trabalho para qualquer executor disponível no grupo ubuntu-runners
:
name: learn-github-actions
on: [push]
jobs:
check-bats-version:
runs-on:
group: ubuntu-runners
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install -g bats
- run: bats -v
Using labels and groups to route jobs
Quando você combina grupos e rótulos, o executor deve atender aos dois requisitos para ser qualificado para executar o trabalho.
Neste exemplo, um grupo de executores chamado ubuntu-runners
é preenchido com executores do Ubuntu, que também receberam o rótulo ubuntu-20.04-16core
. A chave runs-on
combina group
e labels
para que o trabalho seja roteado para qualquer executor disponível dentro do grupo que também tenha um rótulo correspondente:
name: learn-github-actions
on: [push]
jobs:
check-bats-version:
runs-on:
group: ubuntu-runners
labels: ubuntu-20.04-16core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install -g bats
- run: bats -v