Skip to main content

workflow_run_concurrency_groups

Creates, updates, deletes, gets or lists a workflow_run_concurrency_groups resource.

Overview

Nameworkflow_run_concurrency_groups
TypeResource
Idgithub.actions.workflow_run_concurrency_groups

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
group_namestringThe name of the concurrency group.
group_membersarrayItems 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_urlstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_concurrency_groups_for_workflow_runselectowner, repo, run_idper_page, before, afterLists 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 via
before 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.

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.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
run_idintegerThe unique identifier of the workflow run.
afterstringA 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."
beforestringA 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_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

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 via
before 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 }}'
;