From d62b0b2d72584c7282cab0c5d49e0af539e4588b Mon Sep 17 00:00:00 2001 From: Rajendra Reddy Date: Tue, 7 Apr 2026 07:57:19 +0000 Subject: [PATCH] Update .gitea/workflows/quality.yml --- .gitea/workflows/quality.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml index e69de29..39eed11 100644 --- a/.gitea/workflows/quality.yml +++ b/.gitea/workflows/quality.yml @@ -0,0 +1,40 @@ +name: SonarQube Analysis + +on: + workflow_call: + inputs: + project_key: + type: string + required: true + wait_for_quality_gate: + type: boolean + default: false + + secrets: + SONAR_HOST_URL: + required: true + SONAR_TOKEN: + required: true + +jobs: + sonarqube: + runs-on: ubuntu-latest + + container: + image: sonarsource/sonar-scanner-cli:12.0.0.3214_8.0.1 + options: --user root + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Run SonarQube Scan + 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