diff --git a/.github/workflows/sonar_scan.yml b/.github/workflows/sonar_scan.yml index c12d614..378d08c 100644 --- a/.github/workflows/sonar_scan.yml +++ b/.github/workflows/sonar_scan.yml @@ -8,21 +8,18 @@ on: workflow_dispatch: jobs: - sonarcloud_security_scan: - name: SonarCloud Security Scan + sonarcloud: + name: SonarCloud runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Check SonarCloud Quality Gate run: |