From 64bad21b8c4b8b07d99ed84f3f5aa9c877a90b79 Mon Sep 17 00:00:00 2001 From: luancurti Date: Fri, 2 Dec 2022 09:32:22 -0300 Subject: [PATCH] chore(sonar): add github action to scan code --- .github/workflows/sonar-scan.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 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..a6880744 --- /dev/null +++ b/.github/workflows/sonar-scan.yml @@ -0,0 +1,22 @@ +name: Sonar Scan + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + 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.GH_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}