From 4906ee136dc9e92b85cec9a4da98d1b4634350ef Mon Sep 17 00:00:00 2001 From: Shing Rui Date: Fri, 17 May 2024 22:20:13 +0800 Subject: [PATCH] Add sonar scan workflow. --- .github/workflows/sonarcloud-scan.yml | 22 ++++++++++++++++++++++ sonar-project.properties | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/sonarcloud-scan.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarcloud-scan.yml b/.github/workflows/sonarcloud-scan.yml new file mode 100644 index 0000000..a8f6fd5 --- /dev/null +++ b/.github/workflows/sonarcloud-scan.yml @@ -0,0 +1,22 @@ +name: SonarCloud Scan + +on: + push: + branches: + - development + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarcloud: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..47366a7 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.organization=sunquakes +sonar.projectKey=sunquakes_electron-kits + +sonar.sources=. \ No newline at end of file