name: Labeler
on:
  pull_request_target:
    types: [opened, synchronize]

permissions:
  contents: read
  pull-requests: write

jobs:
  label:
    name: Label Pull Request
    runs-on: ubuntu-latest
    steps:
      - name: Apply labels based on changed files
        uses: actions/labeler@v6
        with:
          sync-labels: true
