From 0e5483e0106db9e1d4ce20a14a4f8e9f94a748ec Mon Sep 17 00:00:00 2001 From: Sergey Grigoriev Date: Fri, 2 Aug 2024 12:29:22 +0200 Subject: [PATCH] test: build as jobs --- .github/workflows/build.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5a2ae3..e1e140a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,12 +29,10 @@ jobs: id: cache-maven uses: actions/cache@v3 with: - path: | - /home/runner/.m2/repository - /home/runner/work/${{ github.repository }}/${{ github.repository }}/target - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: | - ${{ runner.os }}-maven- + ${{ runner.os }}-m2- - uses: whelk-io/maven-settings-xml-action@9dc09b23833fa9aa7f27b63db287951856f3433d # v22 with: repositories: > @@ -108,10 +106,10 @@ jobs: - name: Restore Maven cache uses: actions/cache@v3 with: - path: | - /home/runner/.m2/repository - /home/runner/work/${{ github.repository }}/${{ github.repository }}/target - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- - name: Extract artefact version id: artefact_version run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT @@ -141,10 +139,10 @@ jobs: - name: Restore Maven cache uses: actions/cache@v3 with: - path: | - /home/runner/.m2/repository - /home/runner/work/${{ github.repository }}/${{ github.repository }}/target - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- - name: Extract artefact version id: artefact_version run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT