name: Labeler

# see https://github.com/actions/labeler/issues/136#issuecomment-1357839196
on: [pull_request_target]

permissions:
  contents: read

jobs:
  label:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
          fetch-depth: 0
      - uses: actions/labeler@v6
        with:
          repo-token: "${{ github.token }}"
