Feat: Add sonarqube analysis
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Has been cancelled
Some checks failed
SonarQube Scan / SonarQube Trigger (push) Has been cancelled
This commit is contained in:
32
.gitea/workflows/sonar.yml
Normal file
32
.gitea/workflows/sonar.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: SonarQube Scan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
sonarqube:
|
||||
name: SonarQube Trigger
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download SonarQube Scanner
|
||||
run: |
|
||||
curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
|
||||
unzip sonar-scanner.zip
|
||||
|
||||
- name: Run SonarQube Scan
|
||||
run: |
|
||||
./sonar-scanner-*/bin/sonar-scanner \
|
||||
-Dsonar.projectKey=WorkManagementTool \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \
|
||||
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}
|
||||
Reference in New Issue
Block a user