From 6b473da0e67eb9c9958ffbe5f393ba52d616ea05 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Fri, 24 May 2024 23:27:13 +0100 Subject: [PATCH] Add SonarQube --- .github/workflows/build.yml | 12 ++++++++++++ sonar-project.properties | 1 + 2 files changed, 13 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c137e3..24da7b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,18 @@ on: branches: [master] jobs: + analyse: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + build: name: GitHub Container Registry runs-on: ubuntu-latest diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..35e3bfa --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=luketainton_docker-radius_e37b9305-5bf9-4f67-97d9-85eee00bb9d0