Skip to content

Commit 9807cdb

Browse files
committed
fix: add more condition for sonarcloud and codecov to prevent fail from forked repo
1 parent 47471f3 commit 9807cdb

File tree

2 files changed

+264
-177
lines changed

2 files changed

+264
-177
lines changed

.github/workflows/ci-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ jobs:
7676
run: make test
7777

7878
- name: SonarQube Scan
79-
if: matrix.python-version == env.TARGET_PYTHON_VERSION
79+
if: matrix.python-version == env.TARGET_PYTHON_VERSION && github.event.pull_request.head.repo.full_name == github.repository
8080
uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0
8181
env:
8282
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8383

8484
- name: Upload coverage reports to Codecov
85-
if: matrix.python-version == env.TARGET_PYTHON_VERSION
85+
if: matrix.python-version == env.TARGET_PYTHON_VERSION && github.event.pull_request.head.repo.full_name == github.repository
8686
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
8787
with:
8888
fail_ci_if_error: true

0 commit comments

Comments
 (0)