gha: Add automatic PR labeling for modules

Sets up the labeler workflow to automatically label PRs affecting the
`client` and `api` modules.

This allows to distinguish PRs targetting different modules.

TODO: Figure out how to handle PRs that would end up with both labels.
However, I think it's good to see what PRs would that affect.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-09-08 21:39:43 +02:00
parent 604dfe5f47
commit 9d2e74d43d
2 changed files with 26 additions and 0 deletions

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

@@ -0,0 +1,8 @@
module/client:
- changed-files:
- any-glob-to-any-file: 'client/**'
module/api:
- changed-files:
- any-glob-to-any-file: 'api/**'

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

@@ -0,0 +1,18 @@
name: "Labeler"
on:
pull_request_target:
permissions:
contents: read
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Labels
uses: actions/labeler@v6
with:
sync-labels: true