Update .gitea/workflows/sonar.yml
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Failing after 22s
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Failing after 22s
This commit is contained in:
@@ -3,36 +3,38 @@ name: SonarQube Analysis
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- dev
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- dev
|
||||
types: [opened, synchronize, reopened]
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
sonarqube:
|
||||
name: SonarQube Scan
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run SonarScanner (Pinned v12)
|
||||
- name: Run SonarScanner (Docker 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.projectKey=${{ gitea.repository.name }} \
|
||||
-Dsonar.projectName=${{ gitea.repository.name }} \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.exclusions=node_modules/**,dist/**,coverage/** \
|
||||
-Dsonar.qualitygate.wait=true
|
||||
|
||||
Reference in New Issue
Block a user