Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
i: dont restore the cache for the build job, just save it

- otherwise the save fails with a 'already creating' error
  • Loading branch information
paulcwarren committed May 12, 2023
1 parent a7fe259 commit 74ce99e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:

build:
runs-on: ubuntu-latest
outputs:
spring_content_version: ${{ steps.build.outputs.spring_content_version }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -21,23 +23,21 @@ jobs:
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Build and Test
id: build
run: |
export AWS_REGION=us-west-1
pushd spring-content
mvn -B -P tests -Dmaven.javadoc.skip=true install --file pom.xml
project_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "spring_content_version=${project_version}" >> $GITHUB_OUTPUT
popd
- name: Save Maven Cache
id: cache-maven-save
uses: actions/cache/save@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ github.run_id }}

validate-with-examples:
runs-on: ubuntu-latest
Expand All @@ -56,7 +56,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ github.run_id }}
- uses: actions/checkout@v2
with:
repository: paulcwarren/spring-content-examples
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
key: ${{ runner.os }}-maven-${{ github.run_id }}
- uses: actions/checkout@v2
with:
repository: paulcwarren/spring-content-gettingstarted
Expand All @@ -102,5 +102,5 @@ jobs:
run: |
export AWS_REGION=us-west-1
pushd spring-content-gettingstarted
SPRING_CONTENT_VERSION=3.0.2-SNAPSHOT mvn -B clean install
SPRING_CONTENT_VERSION=${{ needs.build.outputs.spring_content_version }} mvn -B clean install
popd

0 comments on commit 74ce99e

Please sign in to comment.