From a5d1ee4d5ecd85d062194f783b9215d520a1b82a Mon Sep 17 00:00:00 2001 From: Kai Bernhard <17817496+kaibernhard@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:32:02 +0200 Subject: [PATCH] Use gradle-build-action --- .github/workflows/pipeline.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2439308..71ed34f 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -34,9 +34,8 @@ jobs: with: java-version: "17.0" distribution: "temurin" - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Setup Gradle + uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c - name: Build with Gradle run: ./gradlew build - name: Send status to Slack @@ -65,9 +64,8 @@ jobs: with: java-version: "17.0" distribution: "temurin" - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Setup Gradle + uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c - name: Run license scanner run: ./gradlew checkLicense - name: Send status to Slack @@ -99,9 +97,8 @@ jobs: with: java-version: "17.0" distribution: "temurin" - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Setup Gradle + uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c - name: Build container image run: ./gradlew bootBuildImage - name: Run Trivy vulnerability scanner @@ -166,14 +163,13 @@ jobs: with: java-version: "17.0" distribution: "temurin" - cache: gradle - name: Cache SonarQube packages uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Setup Gradle + uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c - name: Scan with SonarQube env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any @@ -225,9 +221,8 @@ jobs: with: java-version: "17.0" distribution: "temurin" - cache: gradle - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Setup Gradle + uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c - name: Build and publish container image run: CONTAINER_REGISTRY_USER=${{ github.actor }} CONTAINER_REGISTRY_PASSWORD=${{ secrets.GITHUB_TOKEN }} ./gradlew bootBuildImage --publishImage - name: Install cosign