name: Label Pull Request

on:
  workflow_dispatch:

jobs:
  label:
    runs-on: self-hosted
    permissions:
      contents: read
      pull-requests: write

    steps:
    - name: Checkout
      uses: actions/checkout@v5

    - name: Label PR
      uses: actions/labeler@v4
      with:
        repo-token: ${{ secrets.GITEA_TOKEN }}
        configuration-path: .gitea/labeler.yml
        sync-labels: true
