Skip to main content

workflow_access

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

Overview

Nameworkflow_access
TypeResource
Idgithub.actions.workflow_access

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
access_levelstringDefines the level of access that workflows outside of the repository have to actions and reusable workflows within the repository. none means the access is only possible from workflows in this repository. user level access allows sharing across user owned private repositories only. organization level access allows sharing across the organization. (none, user, organization)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workflow_access_to_repositoryselectowner, repoGets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
This endpoint only applies to private repositories.
For more information, see "Allowing access to components in a private repository."

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
set_workflow_access_to_repositoryreplaceowner, repo, access_levelSets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
This endpoint only applies to private repositories.
For more information, see "Allowing access to components in a private repository".

OAuth app tokens and personal access tokens (classic) need the repo 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.

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.

SELECT examples

Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
This endpoint only applies to private repositories.
For more information, see "Allowing access to components in a private repository."

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

SELECT
access_level
FROM github.actions.workflow_access
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;

REPLACE examples

Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
This endpoint only applies to private repositories.
For more information, see "Allowing access to components in a private repository".

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

REPLACE github.actions.workflow_access
SET
access_level = '{{ access_level }}'
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND access_level = '{{ access_level }}' --required;