From 452f72dc614ffb4e47c41b9fb16212aa39e922ff Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Tue, 24 Mar 2026 19:10:06 +0800 Subject: [PATCH] ci: upload codecov only on main push --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e9094e..524dac1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: if-no-files-found: error - name: Upload web coverage to Codecov - if: ${{ env.CODECOV_TOKEN != '' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && env.CODECOV_TOKEN != '' }} uses: codecov/codecov-action@v5 with: files: apps/web/coverage/lcov.codecov.info @@ -170,7 +170,7 @@ jobs: if-no-files-found: error - name: Upload API coverage to Codecov - if: ${{ env.CODECOV_TOKEN != '' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && env.CODECOV_TOKEN != '' }} uses: codecov/codecov-action@v5 with: files: apps/api/coverage.codecov.out