Add .gitea/workflows/sonar.yml
Some checks failed
SonarQube Analysis / sonarqube (push) Failing after 22s

This commit is contained in:
2026-02-18 13:47:59 +00:00
parent d68a8d6f1f
commit 645c5f7bff

View File

@@ -0,0 +1,38 @@
name: SonarQube Analysis
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
types: [opened, synchronize, reopened]
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run SonarScanner (Pinned v12)
run: |
PROJECT_KEY=${{ gitea.repository.name }}
docker run --rm \
-v "$PWD:/usr/src" \
-w /usr/src \
-e SONAR_HOST_URL=${{ secrets.SONARQUBE_HOST }} \
-e SONAR_TOKEN=${{ secrets.SONARQUBE_TOKEN }} \
sonarsource/sonar-scanner-cli:12 \
-Dsonar.projectKey=$PROJECT_KEY \
-Dsonar.projectName=$PROJECT_KEY \
-Dsonar.sources=. \
-Dsonar.exclusions=node_modules/**,dist/**,coverage/** \
-Dsonar.qualitygate.wait=true