setup sonarqube github action

Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
binsky 2023-07-17 10:25:44 +02:00
parent b58e3ca45e
commit 57506d601d
No known key found for this signature in database
GPG key ID: B438F7FA2E3AC98F
2 changed files with 30 additions and 0 deletions

26
.github/workflows/sonarqube.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: SonarQube
on:
pull_request:
push:
branches:
- master
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

4
sonar-project.properties Normal file
View file

@ -0,0 +1,4 @@
sonar.projectKey=Passman
sonar.qualitygate.wait=true
sonar.sources=.
sonar.language=php