From 30532094ae52c3fb99cea38c455be4b78643ecc3 Mon Sep 17 00:00:00 2001 From: Andrey Inkin Date: Wed, 22 Nov 2023 13:26:17 +1100 Subject: [PATCH] Added sonarcube code scan job --- .github/workflows/code-scan.yml | 20 ++++++++++++++++++++ sonar-project.properties | 1 + 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/code-scan.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/code-scan.yml b/.github/workflows/code-scan.yml new file mode 100644 index 0000000..b665d07 --- /dev/null +++ b/.github/workflows/code-scan.yml @@ -0,0 +1,20 @@ +name: Code scan + +on: + push: + branches: + - main + +jobs: + code-scan: + name: Code scan + runs-on: ubuntu-latest + permissions: read-all + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..3836308 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=uts-cic_ontaskify_AYv01JOdSoFdTa0K0K7B