Skip to content

Actions

Manage GitHub Actions permissions, SHA pinning, workflow defaults, allowed actions, and fork PR approval policies.

spec:
actions:
enabled: true
allowed_actions: selected
sha_pinning_required: true
workflow_permissions: read
can_approve_pull_requests: false
selected_actions:
github_owned_allowed: true
verified_allowed: false
patterns_allowed:
- "actions/*"
- "slackapi/slack-github-action@*"
fork_pr_approval: first_time_contributors
FieldTypeValuesDescription
enabledboolEnable 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_actionsstringall, local_only, selectedWhich Actions are allowed to run
sha_pinning_requiredboolRequire actions to be pinned to a full commit SHA instead of tags or branches
ValueDescription
allAny action from any repository can be used
local_onlyOnly actions defined in the same repository or owner can be used
selectedOnly actions matching selected_actions patterns can be used

Control the default permissions granted to GITHUB_TOKEN in workflows.

FieldTypeValuesDescription
workflow_permissionsstringread, writeDefault GITHUB_TOKEN scope. GitHub recommends read (least privilege)
can_approve_pull_requestsboolAllow 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.

spec:
actions:
enabled: true
allowed_actions: selected
selected_actions:
github_owned_allowed: true
verified_allowed: false
patterns_allowed:
- "actions/*"
- "slackapi/slack-github-action@*"
- "my-org/*"
FieldTypeDescription
github_owned_allowedboolAllow GitHub-owned actions (actions/*, github/*)
verified_allowedboolAllow actions by Marketplace verified creators
patterns_allowedlistGlob patterns for allowed actions (e.g. actions/*, owner/repo@*)

Control when manual approval is required before running workflows on pull requests from forks.

FieldTypeValuesDescription
fork_pr_approvalstringSee belowApproval policy for fork PR workflows
ValueDescription
first_time_contributors_new_to_githubRequire approval only for brand-new GitHub accounts (default)
first_time_contributorsRequire approval for first-time contributors to this repository
all_external_contributorsRequire 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)