From cc9d4fe42d338f4745118d3a3c507601198aac35 Mon Sep 17 00:00:00 2001 From: Andreas Leroux Date: Fri, 18 Oct 2024 12:09:20 +0200 Subject: [PATCH] Disable codecov if PR head and base are different or CODECOV_TOKEN not set Close #169 --- .github/workflows/build-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml index 2d3b52ea7..aeed0389c 100644 --- a/.github/workflows/build-tests.yml +++ b/.github/workflows/build-tests.yml @@ -92,7 +92,7 @@ jobs: gcovr -r ${{github.workspace}} --exclude-unreachable-branches --exclude-throw-branches --xml --output ./coverage.xml -e "src/ecstasy/integrations/sfml/*" ${{github.workspace}}/build/src - name: Upload Coverage Data - if: matrix.GCOV + if: matrix.GCOV && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }}