From 6e6f8a4ed848cb0fb3cd3797afe0c2a18b265d06 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Tue, 18 Jun 2024 14:31:12 +0530 Subject: [PATCH] Issue #ED-4414 fix: added sonar token --- .github/workflows/ci-cd.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 21cf16cbbb..597d8a93a7 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -54,5 +54,20 @@ jobs: - name: Install Sonar Scanner run: sudo npm install -g sonarqube-scanner@3.5.0 - - name: Run Sonar Scanner - run: sonar-scanner \ No newline at end of file + - name: Cache SonarQube Scanner + uses: actions/cache@v2 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonarqube-${{ hashFiles('**/sonar-project.properties') }} + restore-keys: | + ${{ runner.os }}-sonarqube- + + - name: Run SonarQube Analysis + run: | + sonar-scanner \ + -Dsonar.projectKey=Sunbird-Ed_SunbirdEd-mobile-app \ + -Dsonar.organization=sunbird-ed \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.login=$SONAR_TOKEN + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file