Set Github Actions Permissions For Repository

Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository. OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.