Sync Codeowners

February 19, 2026 ยท View on GitHub

Sync CODEOWNERS entries into the VOUCHED list. The action expands any team owners to their members and adds missing users to the vouch file.

Usage

on:
  schedule:
    - cron: "0 0 * * 1"
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: mitchellh/vouch/action/sync-codeowners@v1
        with:
          repo: ${{ github.repository }}

Inputs

NameRequiredDefaultDescription
repoNo""Repository in owner/repo format (empty = current repository)
codeowners-fileNo""Path to CODEOWNERS file (empty = auto-detect)
commit-messageNo""Commit message override
dry-runNo"false"Print what would happen without making changes
merge-immediatelyNo"false"Merge the pull request immediately after creation
pull-requestNo"false"Create a pull request instead of pushing directly
vouched-fileNo""Path to VOUCHED file (empty = auto-detect)

Outputs

NameDescription
statusResult: updated or unchanged

Notes

When pull-request is "true", the action creates a branch and opens a pull request instead of pushing directly. This requires pull-requests: write permission and a token that can create pull requests. The default GITHUB_TOKEN cannot create pull requests unless you enable it in the repository settings.