From e404d56a87f495e22d87185bfaecdccfc7e0f9fc Mon Sep 17 00:00:00 2001 From: Espen Waaga <36693523+espenwaaga@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:41:56 +0100 Subject: [PATCH] =?UTF-8?q?GA:=20Ikke=20kj=C3=B8r=20sonar=20analyse=20ved?= =?UTF-8?q?=20dependabot=20PR=20(#395)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-pr.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index e9c36bc6..95cc0dd7 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -16,6 +16,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup maven uses: whelk-io/maven-settings-xml-action@v20 with: @@ -32,9 +34,15 @@ jobs: - name: Hent tag run: echo "TAG=$(date +%Y.%m.%d.%H%M%S)-$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV + - name: Build - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | echo "Building $TAG" - mvn jacoco:prepare-agent package jacoco:report sonar:sonar -e -B -s settings.xml -Drevision=$TAG + mvn package -e -B -s settings.xml -Drevision=$TAG + + - name: Sonar analyse + if: github.actor != 'dependabot[bot]' + run: | + mvn jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -e -B -s settings.xml -Drevision=$TAG + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}