Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 3.13 KB

File metadata and controls

73 lines (57 loc) · 3.13 KB
title Using Actions Runner Controller runners in a workflow
shortTitle Use ARC in a workflow
intro Use {% data variables.product.prodname_actions_runner_controller %} runners in a workflow file.
versions
fpt ghec ghes
*
*
*
defaultPlatform linux
redirect_from
/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/using-actions-runner-controller-runners-in-a-workflow
/actions/how-tos/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/using-actions-runner-controller-runners-in-a-workflow
/actions/tutorials/actions-runner-controller/using-actions-runner-controller-runners-in-a-workflow
/actions/tutorials/use-actions-runner-controller/use-arc-in-a-workflow
contentType how-tos

Using ARC runners in a workflow file

To assign jobs to run on a runner scale set, you can specify the name of the scale set as the value for the runs-on key in your {% data variables.product.prodname_actions %} workflow file.

For example, the following configuration for a runner scale set has the INSTALLATION_NAME value set to arc-runner-set.

# Using a {% data variables.product.pat_generic_title_case %} (PAT)
INSTALLATION_NAME="arc-runner-set"
NAMESPACE="arc-runners"
GITHUB_CONFIG_URL="https://github.com/<your_enterprise/org/repo>"
GITHUB_PAT="<PAT>"
helm install "${INSTALLATION_NAME}" \
    --namespace "${NAMESPACE}" \
    --create-namespace \
    --set githubConfigUrl="${GITHUB_CONFIG_URL}" \
    --set githubConfigSecret.github_token="${GITHUB_PAT}" \
    oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set

To use this configuration in a workflow, set the value of the runs-on key in your workflow to arc-runner-set, similar to the following example.

jobs:
  job_name:
    runs-on: arc-runner-set

Using runner scale set names

Runner scale set names are unique within the runner group they belong to. To deploy multiple runner scale sets with the same name, they must belong to different runner groups. For more information about specifying runner scale set names, see AUTOTITLE.

{% data reusables.actions.actions-runner-controller-labels %} For more information, see AUTOTITLE.

Using labels to target runner scale sets

You can also assign multiple labels to a runner scale set and use them to target runners in your workflow. To configure labels for a runner scale set, set the runnerScaleSetLabels values in your values.yaml file.

runnerScaleSetLabels:
  - linux
  - gpu
  - private-network

To target a runner scale set with specific labels, specify the labels as an array in the runs-on key of your workflow.

jobs:
  job_name:
    runs-on: [linux, gpu, private-network]

Legal notice

{% data reusables.actions.actions-runner-controller-legal-notice %}