From cf425dbc7a3a34c9f3d351d071004db6165f0f04 Mon Sep 17 00:00:00 2001 From: WDI-Ideas Date: Wed, 8 Apr 2026 20:20:01 +0530 Subject: [PATCH] fix(ci): switch sonar secret names to SONARQUBE_HOST/TOKEN Align central and quality workflows with repository secret names SONARQUBE_HOST and SONARQUBE_TOKEN and pass them to sonar-scanner via environment variables. Made-with: Cursor --- .gitea/workflows/ci.yml | 8 ++++---- .gitea/workflows/quality.yml | 9 +++++---- .gitea/workflows/qualitytest.yml | 9 +++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4e2c70e..a5df26c 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,9 +46,9 @@ on: required: false secrets: - SONAR_HOST_URL: + SONARQUBE_HOST: required: false - SONAR_TOKEN: + SONARQUBE_TOKEN: required: false BETA_SERVER_HOST: @@ -102,8 +102,8 @@ jobs: with: wait_for_quality_gate: ${{ inputs.wait_for_quality_gate }} secrets: - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }} + SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} # 🚀 DEPLOY deploy: diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml index b7d8465..63da905 100644 --- a/.gitea/workflows/quality.yml +++ b/.gitea/workflows/quality.yml @@ -11,9 +11,9 @@ on: default: false secrets: - SONAR_HOST_URL: + SONARQUBE_HOST: required: true - SONAR_TOKEN: + SONARQUBE_TOKEN: required: true jobs: @@ -29,12 +29,13 @@ jobs: uses: actions/checkout@v3 - name: Run SonarQube Scan + env: + SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} + SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} run: | sonar-scanner \ -Dsonar.projectKey=${{ inputs.project_key }} \ -Dsonar.projectName=${{ inputs.project_key }} \ -Dsonar.sources=. \ - -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.token=${{ secrets.SONAR_TOKEN }} \ -Dsonar.exclusions=node_modules/**,dist/**,coverage/** \ -Dsonar.qualitygate.wait=${{ inputs.wait_for_quality_gate }} \ No newline at end of file diff --git a/.gitea/workflows/qualitytest.yml b/.gitea/workflows/qualitytest.yml index 17e4ee1..056bfd5 100644 --- a/.gitea/workflows/qualitytest.yml +++ b/.gitea/workflows/qualitytest.yml @@ -7,9 +7,9 @@ on: required: true type: string secrets: - SONAR_HOST_URL: + SONARQUBE_HOST: required: true - SONAR_TOKEN: + SONARQUBE_TOKEN: required: true jobs: @@ -24,12 +24,13 @@ jobs: - uses: actions/checkout@v3 - name: Run SonarQube Scan (with Quality Gate) + env: + SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} + SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} run: | sonar-scanner \ -Dsonar.projectKey=${{ inputs.project_key }} \ -Dsonar.projectName=${{ inputs.project_key }} \ -Dsonar.sources=. \ - -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.token=${{ secrets.SONAR_TOKEN }} \ -Dsonar.exclusions=node_modules/**,dist/**,coverage/** \ -Dsonar.qualitygate.wait=false \ No newline at end of file