2.0 KiB
title, intro, versions, shortTitle
| title | intro | versions | shortTitle | ||
|---|---|---|---|---|---|
| Using AE hosted runners in a workflow | You can use labels to send jobs to a pool of {% data variables.actions.hosted_runner %}s. |
|
Use AE hosted runners |
{% data reusables.actions.ae-hosted-runners-beta %} {% data reusables.actions.ae-beta %}
Using {% data variables.actions.hosted_runner %}s in a workflow
Labels allow you to send workflow jobs to any {% data variables.actions.hosted_runner %} that includes that label. You can use the default labels, and you can create your own custom labels.
Using default labels to route jobs
An {% data variables.actions.hosted_runner %} receives a label when it is added to {% data variables.product.prodname_actions %}. The label is used to indicate where it was assigned.
You can use your workflow's YAML to send jobs to a specific {% data variables.actions.hosted_runner %} pool. This example demonstrates how to configure a workflow to run on a label called AE-runner-for-CI:
runs-on: [AE-runner-for-CI]
For more information, see "Workflow syntax for {% data variables.product.prodname_actions %}."
Using custom labels to route jobs
You can create custom labels and assign them to your {% data variables.actions.hosted_runner %}s at any time. Custom labels let you send jobs to particular types of runners, based on how they're labeled.
For example, if you have a job that requires a specific software package, you can create a custom label called octocat and assign it to the runners that have the package installed. An {% data variables.actions.hosted_runner %} that matches all the assigned labels will then be eligible to run the job.
This example shows a job that uses multiple labels:
runs-on: [AE-runner-for-CI, octocat, linux]
These labels operate cumulatively, so an {% data variables.actions.hosted_runner %}'s labels must match all of them for it to be eligible to process the job.