forked from ncipollo/release-action
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (31 loc) · 962 Bytes
/
sonar-scan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Scans
on:
pull_request:
push:
jobs:
scan:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
# https://github.com/SonarSource/sonarqube-scan-action
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ github.token }}
SONAR_TOKEN: ${{ secrets.sonar_token }}
SONAR_HOST_URL: ${{ secrets.sonar_host_url }}
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.sonar_token }}
- name: Upload SonarQube Scan Report
uses: actions/upload-artifact@v4
with:
name: sonar-scan-log
path: .scannerwork/report-task.txt