From 56c943d5ad5f1374b9ecf19fee47de6d2b0f1e43 Mon Sep 17 00:00:00 2001 From: Antonio Aversa Date: Wed, 18 Dec 2024 10:45:32 +0100 Subject: [PATCH] SQCPPGHA-13 Use unified sonarqube-scan-action --- .github/workflows/build.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1672c34..05980dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,17 +13,15 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Install sonar-scanner - uses: sonarsource/sonarqube-github-c-cpp@v2 - env: - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # SonarQube URL is stored in a GitHub secret - name: Generate compilation database run: | mkdir build cmake -S . -B build - - name: Run sonar-scanner + - name: Install and run Sonar Scanner + uses: sonarsource/sonarqube-scan-action@v4 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # SonarQube URL is stored in a GitHub secret - run: sonar-scanner --define sonar.cfamily.compile-commands=build/compile_commands.json + with: + args: > + --define sonar.cfamily.compile-commands=build/compile_commands.json