From e1d9dc0be927688e247523ac82bf16dd60fdfc52 Mon Sep 17 00:00:00 2001 From: Paul Sterl Date: Sun, 17 Dec 2023 11:32:51 +0100 Subject: [PATCH] use maven cache --- .github/workflows/maven.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7de6346..12d46b4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,6 +15,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: "zulu" + - name: Cache Maven repository uses: actions/cache@v3 with: @@ -23,12 +29,6 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - - name: Set up JDK 11 - uses: actions/setup-java@v4 - with: - java-version: 11 - distribution: "zulu" - - name: Build with Maven run: mvn -B install --file pom.xml @@ -69,6 +69,14 @@ jobs: java-version: 11 distribution: "zulu" + - name: Cache Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build and deploy maven registry env: GPG_KEYNAME: ${{ secrets.PGP_KEYNAME }}