org_runner_groups
Creates, updates, deletes, gets or lists an org_runner_groups resource.
Overview
| Name | org_runner_groups |
| Type | Resource |
| Id | github.actions.org_runner_groups |
Fields
The following fields are returned by SELECT queries:
- get_self_hosted_runner_group_for_org
- list_self_hosted_runner_groups_for_org
Response
| Name | Datatype | Description |
|---|---|---|
id | number | |
name | string | |
network_configuration_id | string | The identifier of a hosted compute network configuration. |
allows_public_repositories | boolean | |
default | boolean | |
hosted_runners_url | string | |
inherited | boolean | |
inherited_allows_public_repositories | boolean | |
restricted_to_workflows | boolean | If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. |
runners_url | string | |
selected_repositories_url | string | Link to the selected repositories resource for this runner group. Not present unless visibility was set to selected |
selected_workflows | array | List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. |
visibility | string | |
workflow_restrictions_read_only | boolean | If true, the restricted_to_workflows and selected_workflows fields cannot be modified. |
Response
| Name | Datatype | Description |
|---|---|---|
runner_groups | array | |
total_count | number |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_self_hosted_runner_group_for_org | select | org, runner_group_id | Gets a specific self-hosted runner group for an organization. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. | |
list_self_hosted_runner_groups_for_org | select | org | per_page, page, visible_to_repository | Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. |
create_self_hosted_runner_group_for_org | insert | org, name | Creates a new self-hosted runner group for an organization. OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. | |
update_self_hosted_runner_group_for_org | update | org, runner_group_id, name | Updates the name and visibility of a self-hosted runner group in an organization.OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. | |
delete_self_hosted_runner_group_from_org | delete | org, runner_group_id | Deletes a self-hosted runner group for an organization. OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
runner_group_id | integer | Unique identifier of the self-hosted runner group. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
visible_to_repository | string | Only return runner groups that are allowed to be used by this repository. |
SELECT examples
- get_self_hosted_runner_group_for_org
- list_self_hosted_runner_groups_for_org
Gets a specific self-hosted runner group for an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
SELECT
id,
name,
network_configuration_id,
allows_public_repositories,
default,
hosted_runners_url,
inherited,
inherited_allows_public_repositories,
restricted_to_workflows,
runners_url,
selected_repositories_url,
selected_workflows,
visibility,
workflow_restrictions_read_only
FROM github.actions.org_runner_groups
WHERE org = '{{ org }}' -- required
AND runner_group_id = '{{ runner_group_id }}' -- required
;
Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
SELECT
runner_groups,
total_count
FROM github.actions.org_runner_groups
WHERE org = '{{ org }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
AND visible_to_repository = '{{ visible_to_repository }}'
;
INSERT examples
- create_self_hosted_runner_group_for_org
- Manifest
Creates a new self-hosted runner group for an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
INSERT INTO github.actions.org_runner_groups (
name,
visibility,
selected_repository_ids,
runners,
allows_public_repositories,
restricted_to_workflows,
selected_workflows,
network_configuration_id,
org
)
SELECT
'{{ name }}' /* required */,
'{{ visibility }}',
'{{ selected_repository_ids }}',
'{{ runners }}',
{{ allows_public_repositories }},
{{ restricted_to_workflows }},
'{{ selected_workflows }}',
'{{ network_configuration_id }}',
'{{ org }}'
RETURNING
id,
name,
network_configuration_id,
allows_public_repositories,
default,
hosted_runners_url,
inherited,
inherited_allows_public_repositories,
restricted_to_workflows,
runners_url,
selected_repositories_url,
selected_workflows,
visibility,
workflow_restrictions_read_only
;
# Description fields are for documentation purposes
- name: org_runner_groups
props:
- name: org
value: "{{ org }}"
description: Required parameter for the org_runner_groups resource.
- name: name
value: "{{ name }}"
description: |
Name of the runner group.
- name: visibility
value: "{{ visibility }}"
description: |
Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories.
valid_values: ['selected', 'all', 'private']
default: all
- name: selected_repository_ids
value:
- {{ selected_repository_ids }}
description: |
List of repository IDs that can access the runner group.
- name: runners
value:
- {{ runners }}
description: |
List of runner IDs to add to the runner group.
- name: allows_public_repositories
value: {{ allows_public_repositories }}
description: |
Whether the runner group can be used by `public` repositories.
default: false
- name: restricted_to_workflows
value: {{ restricted_to_workflows }}
description: |
If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.
default: false
- name: selected_workflows
value:
- "{{ selected_workflows }}"
description: |
List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.
- name: network_configuration_id
value: "{{ network_configuration_id }}"
description: |
The identifier of a hosted compute network configuration.
UPDATE examples
- update_self_hosted_runner_group_for_org
Updates the name and visibility of a self-hosted runner group in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
UPDATE github.actions.org_runner_groups
SET
name = '{{ name }}',
visibility = '{{ visibility }}',
allows_public_repositories = {{ allows_public_repositories }},
restricted_to_workflows = {{ restricted_to_workflows }},
selected_workflows = '{{ selected_workflows }}',
network_configuration_id = '{{ network_configuration_id }}'
WHERE
org = '{{ org }}' --required
AND runner_group_id = '{{ runner_group_id }}' --required
AND name = '{{ name }}' --required
RETURNING
id,
name,
network_configuration_id,
allows_public_repositories,
default,
hosted_runners_url,
inherited,
inherited_allows_public_repositories,
restricted_to_workflows,
runners_url,
selected_repositories_url,
selected_workflows,
visibility,
workflow_restrictions_read_only;
DELETE examples
- delete_self_hosted_runner_group_from_org
Deletes a self-hosted runner group for an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
DELETE FROM github.actions.org_runner_groups
WHERE org = '{{ org }}' --required
AND runner_group_id = '{{ runner_group_id }}' --required
;