diff --git a/data/reusables/actions/jobs/section-choosing-the-runner-for-a-job.md b/data/reusables/actions/jobs/section-choosing-the-runner-for-a-job.md index e7e44f17da..6e054e5d95 100644 --- a/data/reusables/actions/jobs/section-choosing-the-runner-for-a-job.md +++ b/data/reusables/actions/jobs/section-choosing-the-runner-for-a-job.md @@ -102,4 +102,12 @@ Runner groups can only have [{% data variables.actions.hosted_runner %}s](/actio {% data reusables.actions.jobs.example-runs-on-labels-and-groups %} +{% ifversion ghec or ghes %} + +#### Example: using prefixes to differentiate runner groups + +{% data reusables.actions.using-prefixes-to-differentiate-runner-groups %} + +{% endif %} + {% endif %} diff --git a/data/reusables/actions/section-using-unique-names-for-runner-groups.md b/data/reusables/actions/section-using-unique-names-for-runner-groups.md index e167d8e3eb..5eeeb18480 100644 --- a/data/reusables/actions/section-using-unique-names-for-runner-groups.md +++ b/data/reusables/actions/section-using-unique-names-for-runner-groups.md @@ -12,23 +12,7 @@ To avoid ambiguity, a workflow will fail if there are duplicate runner groups in ### Example: Using prefixes to differentiate runner groups -For example, if you have a runner group named `my-group` in the organization and another named `my-group` in the enterprise, you can update your workflow file to use `org/my-group` or `ent/my-group` to differentiate between the two. - -Using `org/`: - -```yaml -runs-on: - group: org/my-group - labels: [ self-hosted, label-1 ] -``` - -Using `ent/`: - -```yaml -runs-on: - group: ent/my-group - labels: [ self-hosted, label-1 ] -``` +{% data reusables.actions.using-prefixes-to-differentiate-runner-groups %} {% endif %} diff --git a/data/reusables/actions/using-prefixes-to-differentiate-runner-groups.md b/data/reusables/actions/using-prefixes-to-differentiate-runner-groups.md new file mode 100644 index 0000000000..b496ceafa6 --- /dev/null +++ b/data/reusables/actions/using-prefixes-to-differentiate-runner-groups.md @@ -0,0 +1,17 @@ +For example, if you have a runner group named `my-group` in the organization and another named `my-group` in the enterprise, you can update your workflow file to use `org/my-group` or `ent/my-group` to differentiate between the two. + +Using `org/`: + +```yaml +runs-on: + group: org/my-group + labels: [ self-hosted, label-1 ] +``` + +Using `ent/`: + +```yaml +runs-on: + group: ent/my-group + labels: [ self-hosted, label-1 ] +```