From 14440b826689fbe873a4ac9506648874fd3dd9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ho=C3=A0ng=20Anh=20Ti=E1=BA=BFn?= Date: Tue, 20 Aug 2024 16:39:08 +0700 Subject: [PATCH] Update build-with-maven.yml --- .github/workflows/build-with-maven.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-with-maven.yml b/.github/workflows/build-with-maven.yml index 5f9ce36..368e16d 100644 --- a/.github/workflows/build-with-maven.yml +++ b/.github/workflows/build-with-maven.yml @@ -1,6 +1,3 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - name: build-with-maven on: @@ -11,7 +8,6 @@ on: jobs: build: - runs-on: ubuntu-latest steps: @@ -21,6 +17,13 @@ jobs: with: java-version: '21' distribution: 'temurin' - cache: maven + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + ${{ runner.os }}- - name: Build with Maven - run: ./mvnw clean package -DskipTests -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -B -V -U --file pom.xml \ No newline at end of file + run: ./mvnw clean package -DskipTests -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -B -V -U --file pom.xml