Set GitHub Actions permissions for an organization
PUT
/orgs/{org}/actions/permissions
Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
The organization name. The name is not case sensitive.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
enabled_repositories
required
The policy that controls the repositories in the organization that are allowed to run GitHub Actions.
string
allowed_actions
The permissions policy that controls the actions and reusable workflows that are allowed to run.
string
sha_pinning_required
Whether actions must be pinned to a full-length commit SHA.
boolean
Examples
Exampledefault
{ "enabled_repositories": "all", "allowed_actions": "selected", "sha_pinning_required": true}Responses
Section titled “Responses”Response