From ee16dd9755bf101b010152d12cf5668339dc5bf9 Mon Sep 17 00:00:00 2001 From: GearBoxFox <98189655+GearBoxFox@users.noreply.github.com> Date: Sat, 13 Jan 2024 09:35:34 -0800 Subject: [PATCH] Update SonarQube.yml --- .github/workflows/SonarQube.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/SonarQube.yml b/.github/workflows/SonarQube.yml index 3feea36f..04c8e563 100644 --- a/.github/workflows/SonarQube.yml +++ b/.github/workflows/SonarQube.yml @@ -10,11 +10,11 @@ on: types: [edited, submitted] workflow_dispatch: - jobs: build: - name: SonarQube Build + name: Build runs-on: ubuntu-latest + permissions: read-all steps: - uses: actions/checkout@v3.3.0 with: @@ -23,10 +23,8 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: 17 - distribution: 'temurin' - cache: 'gradle' - name: Cache SonarQube packages - uses: actions/cache@v3.2.5 + uses: actions/cache@v1 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar @@ -39,7 +37,10 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Build and analyze env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: ./gradlew build sonar --info + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} run: ./gradlew build sonar --info