name: Sync repo labels # Declaratively syncs labels listed in .github/labels.yml. # Additive only: labels not listed here are left untouched (delete-other-labels: false). # Lifecycle labels (needs-codeowner-review, awaiting-author, awaiting-codeowner) are # created by this workflow but toggled per-PR by .github/workflows/pr-triage.yml. on: push: branches: [main] paths: - '.github/labels.yml' - '.github/workflows/labels-sync.yml' workflow_dispatch: # No concurrency group — intentionally omitted, matching .github/workflows/label-fixed-in-dev.yml. # Previous attempts (#3554, reverted #3599) showed that cancel-in-progress on label workflows # kills useful in-flight runs. Sync is idempotent so concurrent runs are safe. permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions jobs: sync-labels: runs-on: ubuntu-latest timeout-minutes: 5 permissions: contents: read issues: write steps: - name: Harden the runner (Audit all outbound calls) uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 with: egress-policy: audit - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false sparse-checkout: .github/labels.yml sparse-checkout-cone-mode: false - name: Sync labels uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3 with: config-file: .github/labels.yml delete-other-labels: false