Skip to content

Commit b04753a

Browse files
committed
Migrate to SonarQube's new scan action
The old sonarcloud-github-c-cpp action is deprecated. Squashed commit of the following: commit 1c4c4c7cd2ff57e423c610977d0f862b300db87e Author: Paul Colby <[email protected]> Date: Sat Aug 9 14:38:55 2025 +1000 Restore the full build set commit c80a360 Author: Paul Colby <[email protected]> Date: Sat Aug 9 14:12:04 2025 +1000 Migrate to SonarQube's new scan action The old sonarcloud-github-c-cpp action is deprecated.
1 parent ca49fa0 commit b04753a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/sonar.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,22 @@ jobs:
3333
sudo apt update
3434
sudo apt upgrade
3535
sudo apt install qtbase5{,-doc}-dev qtconnectivity5-{dev,doc-html} qttools5-dev{,-tools}
36-
- name: Install sonar-scanner and build-wrapper
37-
uses: SonarSource/sonarcloud-github-c-cpp@v3
38-
- name: Run build-wrapper
36+
- name: Install SonarQube build wrapper
37+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
38+
- name: Build with SonarQube wrapper
3939
env:
4040
CC: ${{ matrix.env.cc }}
4141
CXX: ${{ matrix.env.cxx }}
4242
PROJECT_BUILD_ID: ${{ github.run_number }}.linux.x86-64.${{ matrix.env.cc }}
4343
run: |
4444
cmake -D CMAKE_BUILD_TYPE=Release -S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP"
4545
build-wrapper-linux-x86-64 --out-dir "$RUNNER_TEMP/sonar" cmake --build "$RUNNER_TEMP" --config Release
46-
- name: Run sonar-scanner
46+
- name: Scan with SonarQube
4747
if: github.actor != 'dependabot[bot]'
48+
uses: SonarSource/sonarqube-scan-action@v5
4849
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5050
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
51-
run: |
52-
sonar-scanner --define project.settings=.sonar.properties \
51+
with:
52+
args: >-
53+
--define project.settings=.sonar.properties
5354
--define sonar.cfamily.compile-commands="$RUNNER_TEMP/sonar/compile_commands.json"

0 commit comments

Comments
 (0)