workflow_run_concurrency_groups
Creates, updates, deletes, gets or lists a workflow_run_concurrency_groups resource.
Overview
| Name | workflow_run_concurrency_groups |
| Type | Resource |
| Id | github.actions.workflow_run_concurrency_groups |
Fields
The following fields are returned by SELECT queries:
- list_concurrency_groups_for_workflow_run
Response
| Name | Datatype | Description |
|---|---|---|
group_name | string | The name of the concurrency group. |
group_members | array | Items belonging to this workflow run that are either currently holding or waiting for the concurrency group lease. May be empty if the run no longer has any active or queued items in this group. |
group_url | string (uri) | API URL for this concurrency group. May return 404 if the group has no active items at the time it is requested, since the get-by-name endpoint reports the live repo-wide state of a group while this endpoint lists groups associated with a run by configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_concurrency_groups_for_workflow_run | select | owner, repo, run_id | per_page, before, after | Lists all concurrency groups associated with a workflow run or its jobs. The set of groups is derived from the run's configuration, so a group is included even when the run no longer has any items currently holding or waiting in it. In that case the group_members array will be empty.total_count reflects the number of groups the run participates in byconfiguration, not the number with active items. This differs from GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name},which returns 404 when a group has no active items. That endpoint reports the live state of a group repo-wide, while this endpoint reports the groups associated with a specific run by configuration. Results are sorted by group name and support cursor-based pagination via before and after. The after cursor paginates forward only and doesnot emit a rel="prev" Link; use before to page backward from aforward page's next cursor.OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository. |
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 |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | integer | The unique identifier of the workflow run. |
after | string | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
before | string | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. 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." |
SELECT examples
- list_concurrency_groups_for_workflow_run
Lists all concurrency groups associated with a workflow run or its jobs.
The set of groups is derived from the run's configuration, so a group is
included even when the run no longer has any items currently holding or
waiting in it. In that case the group_members array will be empty.total_count reflects the number of groups the run participates in by
configuration, not the number with active items.
This differs from GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name},
which returns 404 when a group has no active items. That endpoint reports
the live state of a group repo-wide, while this endpoint reports the
groups associated with a specific run by configuration.
Results are sorted by group name and support cursor-based pagination viabefore and after. The after cursor paginates forward only and does
not emit a rel="prev" Link; use before to page backward from a
forward page's next cursor.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.
SELECT
group_name,
group_members,
group_url
FROM github.actions.workflow_run_concurrency_groups
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND run_id = '{{ run_id }}' -- required
AND per_page = '{{ per_page }}'
AND before = '{{ before }}'
AND after = '{{ after }}'
;