diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1682f69..01ac1c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,12 +25,14 @@ jobs: java-version: 17 cache: maven gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }} - - name: Cache work folder - id: cache-work + - name: Cache + id: cache uses: actions/cache@v3 with: - path: ~/work - key: ${{ runner.os }}-work-${{ hashFiles('**/pom.xml') }} + path: | + /home/runner/.m2 + /home/runner/work + key: ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }} - uses: whelk-io/maven-settings-xml-action@9dc09b23833fa9aa7f27b63db287951856f3433d # v22 with: repositories: > @@ -101,12 +103,14 @@ jobs: java-version: 17 cache: maven gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }} - - name: Cache work folder - id: cache-work + - name: Cache + id: cache uses: actions/cache@v3 with: - path: ~/work - key: ${{ runner.os }}-work-${{ hashFiles('**/pom.xml') }} + path: | + /home/runner/.m2 + /home/runner/work + key: ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }} - name: Extract artefact version id: artefact_version run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT @@ -133,12 +137,14 @@ jobs: java-version: 17 cache: maven gpg-private-key: ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }} - - name: Cache work folder - id: cache-work + - name: Cache + id: cache uses: actions/cache@v3 with: - path: ~/work - key: ${{ runner.os }}-work-${{ hashFiles('**/pom.xml') }} + path: | + /home/runner/.m2 + /home/runner/work + key: ${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }} - name: Extract artefact version id: artefact_version run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT