build(ci): do not run sonar on PR from forked repo
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 8 Sep 2023 13:04:27 +0000 (15:04 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 8 Sep 2023 13:04:27 +0000 (15:04 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.github/workflows/ci.yml

index 268297a1e6b909d2d5a2c7a16d721b277ce99e3a..91f9d4a24253ad847b4ef87cf3f69ee5f9b39c4b 100644 (file)
@@ -58,7 +58,7 @@ jobs:
         run: pnpm coverage
 
       - name: Sonar Code Analysis
-        if: ${{ github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }}
+        if: ${{ github.event.repository.fork == false && github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }}
         uses: sonarsource/sonarcloud-github-action@v2.0.1
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}