From 9de8fc5dfc4a5d9ad6e02e7950fb3a9ad073a682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Tue, 5 Mar 2024 15:52:58 +0100 Subject: [PATCH] chore(305): use built-in Maven cache mechanism of setup-java GitHub Action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes com-pas#305 Signed-off-by: Aurélien Pupier --- .github/workflows/build-project.yml | 7 +------ .github/workflows/release-please.yml | 8 +------- .github/workflows/sonarcloud-analysis.yml | 7 +------ .github/workflows/sonarcloud-build.yml | 7 +------ 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index d49d652..38ab630 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -28,12 +28,6 @@ jobs: with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }} - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - name: Set up Docker Buildx id: buildx @@ -43,6 +37,7 @@ jobs: with: distribution: 'zulu' java-version: '17' + cache: 'maven' - name: Create custom Maven Settings.xml uses: whelk-io/maven-settings-xml-action@v21 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 716d146..3abf94a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -32,13 +32,6 @@ jobs: with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }} - - name: Cache Maven packages - if: ${{ steps.release.outputs.release_created }} - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - name: Extract tag name if: ${{ steps.release.outputs.release_created }} @@ -53,6 +46,7 @@ jobs: with: distribution: 'zulu' java-version: '17' + cache: 'maven' - name: Set up Docker Buildx if: ${{ steps.release.outputs.release_created }} id: buildx diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index f0df76f..d05e0fd 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -59,18 +59,13 @@ jobs: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' + cache: 'maven' - name: Set Common Sonar Variables id: sonar_env diff --git a/.github/workflows/sonarcloud-build.yml b/.github/workflows/sonarcloud-build.yml index 9c0b830..44e1135 100644 --- a/.github/workflows/sonarcloud-build.yml +++ b/.github/workflows/sonarcloud-build.yml @@ -36,18 +36,13 @@ jobs: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' + cache: 'maven' - name: Create custom Maven Settings.xml uses: whelk-io/maven-settings-xml-action@v21