From bd1d1a67e77b3ba42d92e92ca4275e2d916abf3c Mon Sep 17 00:00:00 2001 From: Haonan Date: Wed, 26 May 2021 00:00:10 +0800 Subject: [PATCH] Revert "Enable sonar-coveralls for pr from fork repos (#3263)" (#3266) This reverts commit aca9faa97cb4d3d485a65a0cd816cf04993aebde. --- .github/workflows/sonar-coveralls.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sonar-coveralls.yml b/.github/workflows/sonar-coveralls.yml index 68f27057e4..7f1dcdc969 100644 --- a/.github/workflows/sonar-coveralls.yml +++ b/.github/workflows/sonar-coveralls.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Sonar-Coveralls +name: Sonar-Coveralls(Ignore this on folk Repos) on: push: @@ -10,7 +10,7 @@ on: - "rel/*" paths-ignore: - "docs/**" - pull_request_target: + pull_request: branches: - master - "rel/*" @@ -43,7 +43,7 @@ jobs: # we do not compile client-cpp for saving time, it is tested in client.yml run: mvn -B clean post-integration-test -Dtest.port.closed=true -Pcode-coverage - name: Code Coverage (Coveralls) - if: ${{ success() }} + if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push') }} run: | mvn -B post-integration-test -Pcode-coverage -pl code-coverage mvn -B coveralls:report \ @@ -53,7 +53,7 @@ jobs: -DrepoToken=${{ secrets.COVERALL_TOKEN }} \ -Pcode-coverage - name: SonarCloud Report - if: ${{ success() }} + if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} -- GitLab