Skip to content

Commit a57f3aa

Browse files
SQCPPGHA-13 Use unified sonarqube-scan-action
1 parent bd23450 commit a57f3aa

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/build.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16-
- name: Install sonar-scanner
17-
uses: sonarsource/sonarqube-github-c-cpp@v2
18-
env:
19-
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # SonarQube URL is stored in a GitHub secret
2016
- name: Generate compilation database
2117
run: |
2218
mkdir build
2319
cmake -S . -B build
24-
- name: Run sonar-scanner
20+
- name: SonarQube Scan
2521
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2722
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
2823
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # SonarQube URL is stored in a GitHub secret
29-
run: sonar-scanner --define sonar.cfamily.compile-commands=build/compile_commands.json
24+
with:
25+
args: >
26+
--define sonar.cfamily.compile-commands=build/compile_commands.json

0 commit comments

Comments
 (0)