Skip to content

Commit

Permalink
SQCPPGHA-13 Use unified sonarqube-scan-action
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa authored Dec 19, 2024
1 parent bd23450 commit a57f3aa
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ 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: SonarQube Scan
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

0 comments on commit a57f3aa

Please sign in to comment.