feat(actions): Add PR labeler workflow

This commit is contained in:
plcnk
2024-08-17 12:15:50 +02:00
parent 7a7a1af76e
commit 61d0653c14
2 changed files with 34 additions and 0 deletions

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

@ -0,0 +1,7 @@
---
area/ci:
- changed-files:
- any-glob-to-any-file: ".github/**/*"
area/charts:
- changed-files:
- any-glob-to-any-file: "charts/**/*"

27
.github/workflows/labeler.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
---
name: Label PR
on:
workflow_dispatch:
pull_request:
branches:
- master
jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Labeler
uses: actions/labeler@v5
with:
repo-token: "${{ steps.app-token.outputs.token }}"
configuration-path: .github/labeler.yaml