From c34abbbe5b7957abc401a945fa322dc281b61036 Mon Sep 17 00:00:00 2001 From: Aleksandr Rybolovlev Date: Tue, 11 Jun 2024 09:52:29 +0200 Subject: [PATCH] Fix PR labeler workflow (#429) --- .github/pr-labeler.yml | 61 ++++++++++++++++++++++++-------- .github/workflows/pr-labeler.yml | 9 +++-- 2 files changed, 52 insertions(+), 18 deletions(-) diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index b3e7ca27..0209951f 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,34 +1,65 @@ api: -- 'api/**/*.go' +- any: + - changed-files: + - any-glob-to-any-file: + - 'api/**/*.go' controller: -- 'controllers/*.go' +- any: + - changed-files: + - any-glob-to-any-file: + - 'controllers/*.go' crd: -- 'config/crd/bases/*.yaml' +- any: + - changed-files: + - any-glob-to-any-file: + - 'config/crd/bases/*.yaml' dependencies: -- 'go.mod' -- 'go.sum' +- any: + - changed-files: + - any-glob-to-any-file: + - 'go.mod' + - 'go.sum' documentation: -- any: ['*.md'] - all: ['!CHANGELOG.md'] -- 'charts/**/*.md' -- 'docs/*.md' +- all: + - changed-files: + - any-glob-to-any-file: + - '*.md' + - 'charts/**/*.md' + - 'docs/*.md' + - all-globs-to-all-files: + - '!CHANGELOG.md' github_actions: -- '**/workflows/*.yaml' -- '**/workflows/*.yml' +- any: + - changed-files: + - any-glob-to-any-file: + - '**/workflows/*.yaml' + - '**/workflows/*.yml' golang: -- '**/*.go' +- any: + - changed-files: + - any-glob-to-any-file: + - '**/*.go' helm-chart: -- 'charts/**/*.yaml' +- any: + - changed-files: + - any-glob-to-any-file: + - 'charts/**/*.yaml' release: -- 'version/VERSION' +- any: + - changed-files: + - any-glob-to-any-file: + - 'version/VERSION' test: -- '**/*_test.go' +- any: + - changed-files: + - any-glob-to-any-file: + - '**/*_test.go' diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index a53223a1..651e72c2 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -1,9 +1,9 @@ name: "PR Labeler" on: - pull_request_target: - branches: - - main + pull_request_target: + branches: + - main permissions: pull-requests: write @@ -13,6 +13,9 @@ jobs: triage: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - name: Label Pull Request uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: