Răsfoiți Sursa

Switch sonar build to use new "SonarSource/sonarqube-scan-action" action

Jorrit Rouwe 1 săptămână în urmă
părinte
comite
b6d5c03318
1 a modificat fișierele cu 6 adăugiri și 5 ștergeri
  1. 6 5
      .github/workflows/sonar-cloud.yml

+ 6 - 5
.github/workflows/sonar-cloud.yml

@@ -36,8 +36,8 @@ jobs:
       - uses: actions/checkout@v6
       - uses: actions/checkout@v6
         with:
         with:
           fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
           fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
-      - name: Install sonar-scanner and build-wrapper
-        uses: SonarSource/sonarcloud-github-c-cpp@v3
+      - name: Install build-wrapper
+        uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6
       - name: Configure CMake
       - name: Configure CMake
         working-directory: ${{github.workspace}}/Build
         working-directory: ${{github.workspace}}/Build
         run: ./cmake_linux_clang_gcc.sh ReleaseCoverage clang++-${{ env.CLANG_VERSION }}
         run: ./cmake_linux_clang_gcc.sh ReleaseCoverage clang++-${{ env.CLANG_VERSION }}
@@ -50,8 +50,9 @@ jobs:
           llvm-profdata-${{ env.CLANG_VERSION }} merge -sparse default.profraw -o default.profdata
           llvm-profdata-${{ env.CLANG_VERSION }} merge -sparse default.profraw -o default.profdata
           llvm-cov-${{ env.CLANG_VERSION }} show -format=text UnitTests -instr-profile=default.profdata > coverage.txt
           llvm-cov-${{ env.CLANG_VERSION }} show -format=text UnitTests -instr-profile=default.profdata > coverage.txt
       - name: Run sonar-scanner
       - name: Run sonar-scanner
+        uses: SonarSource/sonarqube-scan-action@v6
         env:
         env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-        run: |
-          sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" --define sonar.cfamily.llvm-cov.reportPath="${{github.workspace}}/Build/Linux_ReleaseCoverage/coverage.txt"
+        with:
+          args: >
+            --define sonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json --define sonar.cfamily.llvm-cov.reportPath=${{github.workspace}}/Build/Linux_ReleaseCoverage/coverage.txt