From b1aa57dd687fb770eedf16f0410cd39761708972 Mon Sep 17 00:00:00 2001 From: WaqarAhmedVC <122815219+WaqarAhmedVC@users.noreply.github.com> Date: Fri, 14 Jun 2024 16:45:39 +0100 Subject: [PATCH] Create sonar-scan.yml --- .github/workflows/sonar-scan.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/sonar-scan.yml diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml new file mode 100644 index 00000000..3a6b4383 --- /dev/null +++ b/.github/workflows/sonar-scan.yml @@ -0,0 +1,28 @@ +name: PR Sonar Scan + +on: + push: + branches: + - main + - sonar-integration + pull_request: + +jobs: + sonar-scan: + name: Sonar Scan + runs-on: ubuntu-latest + steps: + - name: Checkout repository + 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 }} + with: + args: > + -Dsonar.verbose=false + -Dsonar.branch.name=${{ github.head_ref || github.ref_name }}