Format one GitHub actions file
[poolifier.git] / .github / workflows / ci.yml
index 8fd1920686e00e0dc458d732dcc7447effdb026e..2f548a0eef09d4248c108d3ba55ab2d00a7f5223 100644 (file)
@@ -5,6 +5,7 @@ on:
     branches:
       - master
   pull_request:
+    types: [opened, synchronize, reopened]
   workflow_dispatch:
     inputs:
       withBenchmark:
@@ -47,11 +48,10 @@ jobs:
           CI: true
 
       - name: Sonar Code Analysis
-        if: "github.repository == 'pioardi/poolifier' && matrix.node-version == '14.x'"
-        run: |
-          npm run sonar
+        if: "github.repository == 'poolifier/poolifier' && matrix.node-version == '14.x'"
+        uses: sonarsource/sonarcloud-github-action@master
         env:
-          GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} # Needed to get PR information, if any
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
 
       - name: Benchmark