Add .gitea/workflows/sonar.yml
This commit is contained in:
39
.gitea/workflows/sonar.yml
Normal file
39
.gitea/workflows/sonar.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Sonar Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- beta
|
||||||
|
- testing
|
||||||
|
- client
|
||||||
|
- staging
|
||||||
|
- production
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sonarqube:
|
||||||
|
name: SonarQube Scan
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: git.wdipl.com/wdipl/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
|
||||||
Reference in New Issue
Block a user