From 98f387b236575488c5e6f1e972cc4dd01dfbd833 Mon Sep 17 00:00:00 2001 From: Tyler Bertrand Date: Mon, 4 Nov 2024 12:00:49 -0600 Subject: [PATCH] Use develocity-actions/setup-maven to surface Build Scan links Don't add PR comment with build scan links - scans aren't published for PR builds against forks --- .github/workflows/codeql-analysis.yml | 8 ++++++-- .github/workflows/receive-pr.yml | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e442a7ff4..710211c27 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -92,10 +92,14 @@ jobs: distribution: 'temurin' java-version: '21' + - name: Setup Develocity + uses: gradle/develocity-actions/setup-maven@v1.2 + with: + add-pr-comment: false + develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + - name: Compile project run: ./mvnw -B -ntp clean package -Pquickbuild -Dtoolchain.skip=true - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/receive-pr.yml b/.github/workflows/receive-pr.yml index 8945e262e..684c5cdea 100644 --- a/.github/workflows/receive-pr.yml +++ b/.github/workflows/receive-pr.yml @@ -28,6 +28,11 @@ jobs: java-version: '21' distribution: 'temurin' cache: 'maven' + - name: Setup Develocity + uses: gradle/develocity-actions/setup-maven@v1.2 + with: + add-pr-comment: false + develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # Capture the PR number # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow @@ -43,8 +48,6 @@ jobs: # Execute recipes - name: Apply OpenRewrite recipes run: ./mvnw -Dtoolchain.skip=true -Dlicense.skip=true -DskipTests=true -P openrewrite clean install - env: - DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # Capture the diff - name: Create patch