| name: "Pull Request Labeler" | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize] | |
| # pull_request_target runs on the base branch, so github.ref would put all pull | |
| # requests into one group; group by pull request number instead | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| label: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 | |
| with: | |
| egress-policy: audit | |
| - uses: srvaroa/labeler@bf262763a8a8e191f5847873aecc0f29df84f957 # v1.14.0 | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |