Skip to content

Commit e1f4600

Browse files
authored
Replace deprecated sonarcloud-github-c-cpp action
he SonarSource/sonarcloud-github-c-cpp action has been removed. Migrate to SonarSource/sonarqube-scan-action@v7 and its install-build-wrapper sub-action.
1 parent b8aa228 commit e1f4600

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/sonar-source.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
25-
- name: Install sonar-scanner and build-wrapper
26-
uses: SonarSource/sonarcloud-github-c-cpp@v2
25+
- name: Install Build Wrapper
26+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v7
2727
- name: Install dependencies
2828
run: |
2929
sudo apt-get update
@@ -78,9 +78,11 @@ jobs:
7878
echo "\n ... \n"
7979
tail -n 7 "$FILE"
8080
- name: Run sonar-scanner
81+
uses: SonarSource/sonarqube-scan-action@v7
8182
env:
8283
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8384
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
84-
run: |
85-
source $(find /home -path "*/bin/*" -name "*thisbdm.sh")
86-
sonar-scanner -X --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
85+
with:
86+
args: >
87+
-X
88+
--define sonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json

0 commit comments

Comments
 (0)