This is an automated email from the ASF dual-hosted git repository.

twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new e9391650e fix(ci): the sonar c/cpp action has been deprecated (#3280)
e9391650e is described below

commit e9391650ebc8464af63bbd8e70f99f1ff6f094da
Author: hulk <[email protected]>
AuthorDate: Mon Dec 1 13:40:18 2025 +0800

    fix(ci): the sonar c/cpp action has been deprecated (#3280)
---
 .github/workflows/kvrocks.yaml |  4 ++--
 .github/workflows/sonar.yaml   | 32 ++++++++++++++++++--------------
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml
index af40ea450..34ae32790 100644
--- a/.github/workflows/kvrocks.yaml
+++ b/.github/workflows/kvrocks.yaml
@@ -329,8 +329,8 @@ jobs:
         run: pip install gcovr==5.0 # 5.1 is not supported
         if: ${{ matrix.sonarcloud }}
 
-      - name: Install sonar-scanner and build-wrapper
-        uses: SonarSource/sonarcloud-github-c-cpp@v3
+      - name: Install Build Wrapper
+        uses: SonarSource/sonarqube-scan-action/[email protected]
         if: ${{ matrix.sonarcloud }}
 
       - name: Build Kvrocks
diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml
index d9ad8feff..1915fc464 100644
--- a/.github/workflows/sonar.yaml
+++ b/.github/workflows/sonar.yaml
@@ -33,8 +33,8 @@ jobs:
           repository: ${{ github.event.workflow_run.head_repository.full_name 
}}
           ref: ${{ github.event.workflow_run.head_sha }}
           fetch-depth: 0
-      - name: Install sonar-scanner and build-wrapper
-        uses: SonarSource/sonarcloud-github-c-cpp@v3
+      - name: Install Build Wrapper
+        uses: SonarSource/sonarqube-scan-action/[email protected]
       - name: 'Download code coverage'
         uses: actions/github-script@v7
         with:
@@ -66,18 +66,22 @@ jobs:
         with:
           python-version: 3.x
 
-      - name: Run sonar-scanner
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+      - name: Extract PR number
         run: |
           PR_NUMBER=$(jq -r '.number | select (.!=null)' 
sonarcloud-data/github-event.json)
-          echo "The PR number is $PR_NUMBER"
+          echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV"
+          echo "The PR number is ${PR_NUMBER:-<none>}"
 
-          sonar-scanner \
-            --define sonar.cfamily.build-wrapper-output="sonarcloud-data" \
-            --define sonar.coverageReportPaths=sonarcloud-data/coverage.xml \
-            --define sonar.projectKey=apache_kvrocks \
-            --define sonar.organization=apache \
-            --define sonar.scm.revision=${{ github.event.workflow_run.head_sha 
}} \
-            --define sonar.pullrequest.key=$PR_NUMBER
+      - name: SonarQube Scan
+        uses: SonarSource/[email protected]
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+        with:
+          args: >
+            -Dsonar.cfamily.build-wrapper-output="sonarcloud-data"
+            -Dsonar.coverageReportPaths=sonarcloud-data/coverage.xml
+            -Dsonar.projectKey=apache_kvrocks
+            -Dsonar.organization=apache
+            -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
+            -Dsonar.pullrequest.key=${{ env.PR_NUMBER }}

Reply via email to