From 24bbf2ecddbb268b4f511f67b33a415c41791a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 27 Feb 2025 21:52:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Add=20CI=20Labeler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/labeler.yml | 14 ++++++++++++++ .github/workflows/labeler.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..a927daf --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,14 @@ +internal: + - all: + - changed-files: + - any-glob-to-any-file: + - .github/** + - .gitignore + - all-globs-to-all-files: + - '!docker-images/requirements.txt' + +upgrade: + - all: + - changed-files: + - any-glob-to-any-file: + - docker-images/requirements.txt diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..b55d0eb --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,33 @@ +name: Labels +on: + pull_request_target: + types: + - opened + - synchronize + - reopened + # For label-checker + - labeled + - unlabeled + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }} + - run: echo "Done adding labels" + # Run this after labeler applied labels + check-labels: + needs: + - labeler + permissions: + pull-requests: read + runs-on: ubuntu-latest + steps: + - uses: docker://agilepathway/pull-request-label-checker:latest + with: + one_of: breaking,security,feature,bug,refactor,upgrade,docs,internal + repo_token: ${{ secrets.GITHUB_TOKEN }}