Skip to content

Commit ef4a688

Browse files
committed
use analyze action
1 parent cbd1cb7 commit ef4a688

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,14 @@ jobs:
3030
matrix:
3131
include:
3232
- name: "Analysis on SonarQube NEXT"
33-
sonar_token_path: "development/kv/data/next"
34-
sonar_host_url: "https://next.sonarqube.com/sonarqube"
33+
sonarqube_instance: "next"
3534
sonar_project_key: "org.sonarsource.python:python"
36-
run_condition: "always"
3735
- name: "Analysis on Sonarcloud.io"
38-
sonar_token_path: "development/kv/data/sonarcloud"
39-
sonar_host_url: "https://sonarcloud.io"
36+
sonarqube_instance: "sqc-eu"
4037
sonar_project_key: "SonarSource_sonar-python"
41-
run_condition: "nightly"
4238
- name: "Analysis on SonarQube.us"
43-
sonar_token_path: "development/kv/data/sonarqube-us"
44-
sonar_host_url: "https://sonarqube.us"
39+
sonarqube_instance: "sqc-us"
4540
sonar_project_key: "SonarSource_sonar-python"
46-
run_condition: "nightly"
4741
steps:
4842
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4943

@@ -54,23 +48,21 @@ jobs:
5448
git sparse-checkout set stubs/sklearn
5549
git checkout
5650
57-
- name: Get sonar token
58-
id: secrets
59-
uses: SonarSource/vault-action-wrapper@v3
60-
with:
61-
secrets: |
62-
${{ matrix.sonar_token_path }} token | SONAR_TOKEN;
63-
6451
- uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1
6552
with:
6653
version: 2025.12.12
6754

6855
- name: Remove private directory
6956
run: rm -rf private
7057

58+
- name: Get project version
59+
id: project-version
60+
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
61+
7162
- name: Analyze
72-
run: bash ./.cirrus/analyze.sh
73-
env:
74-
SONAR_TOKEN: ${{ fromJson(steps.secrets.outputs.vault).SONAR_TOKEN }}
75-
SONAR_HOST_URL: ${{ matrix.sonar_host_url }}
76-
SONAR_PROJECT_KEY: ${{ matrix.sonar_project_key }}
63+
uses: ./.github-commons/actions/analyze
64+
with:
65+
sonarqube-instance: ${{ matrix.sonarqube_instance }}
66+
sonar-project-key: ${{ matrix.sonar_project_key }}
67+
sonar-project-name: Python
68+
sonar-project-version: ${{ steps.project-version.outputs.version }}

0 commit comments

Comments
 (0)