Skip to content

Commit 9d5dcb9

Browse files
authored
Create build.yml
💚 Implement sonarqube CI
1 parent f027358 commit 9d5dcb9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
9+
jobs:
10+
build:
11+
name: Build and analyze
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
18+
- uses: sonarsource/sonarqube-scan-action@v4
19+
env:
20+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
21+
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
22+
# If you wish to fail your job when the Quality Gate is red, uncomment the
23+
# following lines. This would typically be used to fail a deployment.
24+
# - uses: sonarsource/sonarqube-quality-gate-action@v1
25+
# timeout-minutes: 5
26+
# env:
27+
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)