From a46baf48638e29a33329d1694cd021f7a6d0eb78 Mon Sep 17 00:00:00 2001 From: Regina Voloshin Date: Thu, 12 Feb 2026 16:30:13 +0200 Subject: [PATCH] ci: make Upload code coverage information to codecov.io step always run (#26379) Signed-off-by: reggie-k --- .github/workflows/ci-build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index faddbb748f..006fccdae2 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -390,16 +390,17 @@ jobs: run: | go tool covdata percent -i=test-results,e2e-code-coverage/applicationset-controller,e2e-code-coverage/repo-server,e2e-code-coverage/app-controller,e2e-code-coverage/commit-server -o test-results/full-coverage.out - name: Upload code coverage information to codecov.io + # Only run when the workflow is for upstream (PR target or push is in argoproj/argo-cd). + if: github.repository == 'argoproj/argo-cd' uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: files: test-results/full-coverage.out fail_ci_if_error: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - if: env.codecov_secret != '' - name: Upload test results to Codecov - # Codecov uploads test results to Codecov.io on upstream master branch and on fork master branch if the token is configured. - if: env.codecov_secret != '' && github.ref == 'refs/heads/master' && github.event_name == 'push' + # Codecov uploads test results to Codecov.io on upstream master branch. + if: github.repository == 'argoproj/argo-cd' && github.ref == 'refs/heads/master' && github.event_name == 'push' uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: files: test-results/junit.xml