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
This commit is contained in:
WDI-Ideas
2026-04-08 20:20:01 +05:30
parent 32582809a1
commit cf425dbc7a
3 changed files with 14 additions and 12 deletions

View File

@@ -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:

View File

@@ -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 }}

View File

@@ -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