From 92bdad558e724e52f599a472a4e192da8bf963a2 Mon Sep 17 00:00:00 2001 From: phm07 <22707808+phm07@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:57:22 +0200 Subject: [PATCH 1/3] ci: don't upload coverage reports on bot PRs --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e1ece76..f7dbba08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,7 @@ jobs: run: go test -coverprofile=coverage.txt -v -race ./... - name: Upload coverage reports to Codecov + if: github.actor != 'Hetzner Cloud Bot' && github.actor != 'renovate[bot]' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} From 360269ef0c5e4d3130c5bc3e3409131113cd26ba Mon Sep 17 00:00:00 2001 From: phm07 <22707808+phm07@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:07:25 +0200 Subject: [PATCH 2/3] check against branch name instead of username --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7dbba08..72a6f10d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,8 @@ jobs: run: go test -coverprofile=coverage.txt -v -race ./... - name: Upload coverage reports to Codecov - if: github.actor != 'Hetzner Cloud Bot' && github.actor != 'renovate[bot]' + # don't run if branch name starts with 'renovate/' or 'release-please--' + if: "!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'release-please--')" uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} From 379c7d8c122cf1c554714c4e18e30935d0af3017 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 25 Jul 2024 12:54:36 +0200 Subject: [PATCH 3/3] ci: format condition --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72a6f10d..497eb872 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,9 @@ jobs: run: go test -coverprofile=coverage.txt -v -race ./... - name: Upload coverage reports to Codecov - # don't run if branch name starts with 'renovate/' or 'release-please--' - if: "!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'release-please--')" + if: > + !startsWith(github.head_ref, 'renovate/') && + !startsWith(github.head_ref, 'release-please--') uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}