Add .gitea/workflows/sonar.yml
Some checks failed
SonarQube Analysis / sonarqube (push) Failing after 22s
Some checks failed
SonarQube Analysis / sonarqube (push) Failing after 22s
This commit is contained in:
38
.gitea/workflows/sonar.yml
Normal file
38
.gitea/workflows/sonar.yml
Normal 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
|
||||||
Reference in New Issue
Block a user