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