diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml index 2d3b52ea7..0b57665ae 100644 --- a/.github/workflows/build-tests.yml +++ b/.github/workflows/build-tests.yml @@ -92,7 +92,9 @@ 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 + env: + codecov_secret: ${{ secrets.CODECOV_TOKEN }} + if: matrix.GCOV && ${{ env.codecov_secret != '' }} && (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 }}