summaryrefslogtreecommitdiff
path: root/.github/workflows/sonarqube.yml
blob: 2df2bd8383b01e3cbe5791128de75f3d723c00af (plain)
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
name: SonarQube scan

on:
  # Trigger analysis when pushing to your main branches, and when creating a pull request.
  push:
    branches:
      - main
      - develop
      - 'release/**'
  pull_request:
      types: [opened, synchronize, reopened]
 
jobs:
  sonarqube:
    runs-on: ip-range-controlled
#    runs-on: ubuntu-latest for GH runner
#    needs: [build]
    steps:
    - uses: actions/checkout@v3
      with:
        # Disabling shallow clone is recommended for improving relevancy of reporting
        fetch-depth: 0
    - name: SonarQube Scan
      uses: sonarsource/sonarqube-scan-action@master
      env:
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}