-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (48 loc) · 1.43 KB
/
quality.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Quality
on:
workflow_dispatch: {}
# push:
# branches:
# - latest
# paths-ignore:
# - 'helmfile.*'
# - 'Dockerfile'
# - 'docker-compose.yml'
# - '.git*'
# - '.dockerignore'
# - '.github/**'
jobs:
sonar-quality-check:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.sources=packages
-Dsonar.projectName=${{ github.event.repository.name }}
-Dsonar.projectBaseDir=.
-Dsonar.organization=bn-digital
- 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 }}
- name: Scan overview
run: echo "https://sonarqube.bndigital.dev/dashboard?id=${{ github.event.repository.name }}"