From 172f194468f7408fbff11c2aecd44d6e2af94ea4 Mon Sep 17 00:00:00 2001 From: Rajendra Reddy Date: Mon, 13 Apr 2026 02:19:06 +0000 Subject: [PATCH] Add .gitea/workflows/sonar.yml --- .gitea/workflows/sonar.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/sonar.yml diff --git a/.gitea/workflows/sonar.yml b/.gitea/workflows/sonar.yml new file mode 100644 index 0000000..d64b636 --- /dev/null +++ b/.gitea/workflows/sonar.yml @@ -0,0 +1,39 @@ +name: Klc-Learner-Frontend-Sonar + +on: + pull_request: + branches: + - main + - beta + - testing + - client + - staging + - production + +jobs: + sonarqube: + name: SonarQube Scan + runs-on: ubuntu-latest + + container: + image: sonarsource/sonar-scanner-cli:12.0.0.3214_8.0.1 + options: --user root + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Run Sonar Scan + run: | + REPO_NAME=${{ gitea.event.repository.name }} + + sonar-scanner \ + -Dsonar.projectKey=$REPO_NAME \ + -Dsonar.projectName=$REPO_NAME \ + -Dsonar.sources=. \ + -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \ + -Dsonar.token=${{ secrets.SONARQUBE_TOKEN }} \ + -Dsonar.exclusions=node_modules/**,dist/**,coverage/** \ + -Dsonar.qualitygate.wait=true \ No newline at end of file