Skip to main content

allowed_actions

Creates, updates, deletes, gets or lists an allowed_actions resource.

Overview

Nameallowed_actions
TypeResource
Idgithub.actions.allowed_actions

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
github_owned_allowedbooleanWhether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.
patterns_allowedarraySpecifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*. > [!NOTE] > The patterns_allowed setting only applies to public repositories.
verified_allowedbooleanWhether actions from GitHub Marketplace verified creators are allowed. Set to true to allow all actions by GitHub Marketplace verified creators.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_allowed_actions_repositoryselectowner, repoGets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for a repository."

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
get_allowed_actions_organizationselectorgGets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
set_allowed_actions_repositoryreplaceowner, repoSets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for a repository."

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
set_allowed_actions_organizationreplaceorgSets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."

OAuth app tokens and personal access tokens (classic) need the admin:org 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
orgstringThe organization name. The name is not case sensitive.
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 settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for a repository."

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

SELECT
github_owned_allowed,
patterns_allowed,
verified_allowed
FROM github.actions.allowed_actions
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;

REPLACE examples

Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for a repository."

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

REPLACE github.actions.allowed_actions
SET
github_owned_allowed = {{ github_owned_allowed }},
verified_allowed = {{ verified_allowed }},
patterns_allowed = '{{ patterns_allowed }}'
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required;