Manage GitHub Actions permissions, SHA pinning, workflow defaults, allowed actions, and fork PR approval policies.
allowed_actions: selected
sha_pinning_required: true
workflow_permissions: read
can_approve_pull_requests: false
github_owned_allowed: true
- "slackapi/slack-github-action@*"
fork_pr_approval: first_time_contributors
| Field | Type | Values | Description |
|---|
enabled | bool | | Enable or disable Actions for this repository. false stops all workflows. Required when any other actions field is set, due to a GitHub API limitation |
allowed_actions | string | all, local_only, selected | Which Actions are allowed to run |
sha_pinning_required | bool | | Require actions to be pinned to a full commit SHA instead of tags or branches |
| Value | Description |
|---|
all | Any action from any repository can be used |
local_only | Only actions defined in the same repository or owner can be used |
selected | Only actions matching selected_actions patterns can be used |
Control the default permissions granted to GITHUB_TOKEN in workflows.
| Field | Type | Values | Description |
|---|
workflow_permissions | string | read, write | Default GITHUB_TOKEN scope. GitHub recommends read (least privilege) |
can_approve_pull_requests | bool | | Allow workflows to create and approve pull request reviews |
Only applies when allowed_actions: selected. Specifying selected_actions without allowed_actions: selected is a validation error.
allowed_actions: selected
github_owned_allowed: true
- "slackapi/slack-github-action@*"
| Field | Type | Description |
|---|
github_owned_allowed | bool | Allow GitHub-owned actions (actions/*, github/*) |
verified_allowed | bool | Allow actions by Marketplace verified creators |
patterns_allowed | list | Glob patterns for allowed actions (e.g. actions/*, owner/repo@*) |
Control when manual approval is required before running workflows on pull requests from forks.
| Field | Type | Values | Description |
|---|
fork_pr_approval | string | See below | Approval policy for fork PR workflows |
| Value | Description |
|---|
first_time_contributors_new_to_github | Require approval only for brand-new GitHub accounts (default) |
first_time_contributors | Require approval for first-time contributors to this repository |
all_external_contributors | Require approval for all contributors without write access (most strict) |
The following Actions settings are not yet supported by gh-infra:
- Artifact and log retention period
- Cache retention and storage limits
- OIDC subject claim customization
- Environments (deployment protection rules, reviewers, branch policies)
- Self-hosted runner configuration
- Fork PR settings for private repositories (
send_write_tokens, send_secrets)