1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Actions - add group: prefix example to workflow syntax article (#48587)

This commit is contained in:
Joe Clark
2024-01-09 10:48:07 -08:00
committed by GitHub
parent e0d30a8801
commit 6fcbc53cf9
3 changed files with 26 additions and 17 deletions

View File

@@ -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 %} {% 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 %} {% endif %}

View File

@@ -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 ### 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. {% data reusables.actions.using-prefixes-to-differentiate-runner-groups %}
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 ]
```
{% endif %} {% endif %}

View File

@@ -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 ]
```