Skip to content

Commit 0417582

Browse files
Add Sonarqube workflow for code analysis
1 parent c876031 commit 0417582

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎.github/workflows/sonarqube.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Sonarqube
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
10+
jobs:
11+
build:
12+
name: Analyze
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
19+
- uses: SonarSource/sonarqube-scan-action@v5
20+
env:
21+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
22+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
23+
# If you wish to fail your job when the Quality Gate is red, uncomment the
24+
# following lines. This would typically be used to fail a deployment.
25+
# We do not recommend to use this in a pull request. Prefer using pull request
26+
# decoration instead.
27+
# - uses: SonarSource/sonarqube-quality-gate-action@v1
28+
# timeout-minutes: 5
29+
# env:
30+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)