Skip to content

Managing Repos Centrally

Keep all your gh-infra YAML files in a single dedicated repository (e.g., github-config). This is the recommended approach when one person or team is responsible for repository settings across an organization.

  • Directorygithub-config/
    • Directoryrepos/
      • my-cli.yaml
      • dotfiles.yaml
      • blog.yaml
      • gh-infra.yaml
    • Directoryfiles/
      • common.yaml
  • repos/ — One Repository or RepositorySet file per repo (or group of repos)
  • files/FileSet manifests for distributing shared files
Terminal window
# Preview all changes across all repos
gh infra plan ./repos/
# Apply everything
gh infra apply ./repos/

All changes are reviewed and applied from one place. You get a single git log showing the full history of every infrastructure change across all your repositories.

Some repos may want to manage their own settings (see Self-Managed Repos). Simply omit those repos from your central YAML files — gh-infra only manages what’s declared.

  • You manage many repositories with an org-wide standard
  • You want a single audit trail for all infrastructure changes
  • One team is responsible for repository governance (branch protection, merge strategy, etc.)
  • Individual teams need to control their own repo settings independently
  • You only manage 1–2 repos — the overhead of a dedicated config repo isn’t worth it