v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2024-03-2585861610.1 MB
enterprise-admin

Create a self-hosted runner group for an enterprise

Creates a new self-hosted runner group for an enterprise.

OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise scope to use this endpoint.

post/enterprises/{enterprise}/actions/runner-groups

Path parameters

enterprisestring required

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Request body

namestring required

Name of the runner group.

visibility'selected' | 'all'

Visibility of a runner group. You can select all organizations or select individual organization.

selected_organization_idsinteger[]

List of organization IDs that can access the runner group.

runnersinteger[]

List of runner IDs to add to the runner group.

allows_public_repositoriesboolean

Whether the runner group can be used by public repositories.

restricted_to_workflowsboolean

If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array.

selected_workflowsstring[]

List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.

Example request

{
  "selected_workflows": [
    "octo-org/octo-repo/.github/workflows/deploy.yaml@main"
  ]
}

Response

Response

idnumber required
namestring required
visibilitystring required
defaultboolean required
selected_organizations_urlstring
runners_urlstring required
allows_public_repositoriesboolean required
workflow_restrictions_read_onlyboolean

If true, the restricted_to_workflows and selected_workflows fields cannot be modified.

restricted_to_workflowsboolean

If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array.

selected_workflowsstring[]

List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true.

Example response

{
  "selected_workflows": [
    "octo-org/octo-repo/.github/workflows/deploy.yaml@main"
  ]
}