Skip to content

Label Sync

Syncs a labels.yml file in the caller repository to GitHub labels via the Issues API. Labels not present in the file are left untouched; labels in the file are created or updated.

Usage

yaml
jobs:
  label-sync:
    uses: KevinDeBenedetti/github-workflows/.github/workflows/label-sync.yml@main
    secrets: inherit

Inputs

InputTypeDefaultDescription
labels-pathstringlabels.ymlPath to the labels definition file in the caller repo

Secrets

SecretRequiredDescription
tokenPAT with issues:write. Falls back to GITHUB_TOKEN if not set

Permissions

ScopeLevelReason
contentsreadCheckout
issueswriteCreate/update labels

Notes

  • Uses the sync script from KevinDeBenedetti/github-workflows — no additional setup required in the caller.
  • The labels.yml format should be a list of label objects: name, color, description.
  • Designed to be triggered on pushes to the default branch whenever labels.yml changes.