ci: upload codecov only on main push

This commit is contained in:
xixu-me committed 2026-03-24 19:10:06 +08:00
1 parent 9eb6c6a8fa
commit 452f72dc61
1 file changed
+2 -2
+2 -2
View File
@@ -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