Actions - add group: prefix example to workflow syntax article (#48587)
This commit is contained in:
@@ -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 %}
|
||||||
|
|||||||
@@ -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 %}
|
||||||
|
|
||||||
|
|||||||
@@ -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 ]
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user