name: Sync labels

on:
  push:
    branches:
      - main
    paths:
      - .github/labels.yml
  workflow_dispatch:

jobs:
  sync:
    permissions:
      pull-requests: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: micnncim/action-label-syncer@v1
        with:
          prune: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
