ci: add PR labeler workflow

Label based on target release branch. Labels must be manually defined to
avoid giving the action unnecessary permissions. Release labels must be
defined in the config after each release is forked.

Signed-off-by: George Sapkin <george@sapk.in>
This commit is contained in:
George Sapkin
2025-11-07 23:21:18 +02:00
committed by Josef Schlehofer
parent 12342ac3ea
commit a9ae28811a
2 changed files with 27 additions and 0 deletions

7
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
# branches
"OpenWrt 23.05 (end of support)":
- base-branch:
- "openwrt-23.05"
"OpenWrt 24.10":
- base-branch:
- "openwrt-24.10"

20
.github/workflows/labeler.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: 'Pull Request Labeler'
on:
- pull_request_target
permissions:
contents: read
jobs:
labeler:
permissions:
contents: read
pull-requests: write
name: Pull Request Labeler
runs-on: ubuntu-slim
steps:
- uses: actions/labeler@v6
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true