From 61d0653c1412e12d1392b3df5d72623b91c07068 Mon Sep 17 00:00:00 2001 From: plcnk Date: Sat, 17 Aug 2024 12:15:50 +0200 Subject: [PATCH] feat(actions): Add PR labeler workflow --- .github/labeler.yaml | 7 +++++++ .github/workflows/labeler.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/labeler.yaml create mode 100644 .github/workflows/labeler.yaml diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 0000000..e873846 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,7 @@ +--- +area/ci: + - changed-files: + - any-glob-to-any-file: ".github/**/*" +area/charts: + - changed-files: + - any-glob-to-any-file: "charts/**/*" diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..f4d8f47 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -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