---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Label Sync"

on:
  workflow_dispatch:
  push:
    branches:
      - main
    paths: [".github/labels.yaml"]

  pull_request_target:
    types: [opened, synchronize, reopened]
    branches:
      - main
    paths: [".github/labels.yaml"]
jobs:
  label-sync:
    name: Label Sync
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0  # v7

      - name: Sync Labels
        uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2
        with:
          config-file: .github/labels.yaml
          delete-other-labels: true
