workflow_access
Creates, updates, deletes, gets or lists a workflow_access resource.
Overview
| Name | workflow_access |
| Type | Resource |
| Id | github.actions.workflow_access |
Fields
The following fields are returned by SELECT queries:
- get_workflow_access_to_repository
Response
| Name | Datatype | Description |
|---|---|---|
access_level | string | Defines 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workflow_access_to_repository | select | owner, repo | 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. | |
set_workflow_access_to_repository | replace | owner, repo, access_level | 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. |
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. |
SELECT examples
- get_workflow_access_to_repository
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
- set_workflow_access_to_repository
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;