From 16ca3e17e8f174511a4e080b443ef1b835625672 Mon Sep 17 00:00:00 2001 From: mtpoly <128363128+mt-polygon-technology@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:32:38 +0100 Subject: [PATCH] Update sonarqube.yml --- .github/workflows/sonarqube.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 30c260db..0f5ef01a 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -1,22 +1,24 @@ -name: SonarQube analysis - +name: Security Build on: push: branches: + - main - develop - + - staging + workflow_dispatch: {} + pull_request: + types: [opened, synchronize, reopened] + jobs: - sonarqube: + sonarcloud: + name: SonarCloud runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - # Disabling shallow clone is recommended for improving relevancy of reporting. - fetch-depth: 0 - - # Triggering SonarQube analysis as results of it are required by Quality Gate check. - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}