From e3ffa913e9e3a972c477d89d34a6038824b0820a Mon Sep 17 00:00:00 2001 From: Nicolas Henneaux Date: Thu, 18 Jan 2024 21:10:28 +0100 Subject: [PATCH] Run Sonar only on Java 21/Ubuntu (#50) --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 09989d0..91deba8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,12 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build with Maven - run: mvn -B -C -Dgroups='!unstableGithub' verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + run: mvn -B -C -Dgroups='!unstableGithub' verify + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Sonar + run: mvn -B -C org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + if: ${{ matrix.java == 21 && matrix.os == 'ubuntu-latest' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}