Skip to content

Commit 03610a5

Browse files
bytt til setup-java cache
1 parent 75fded5 commit 03610a5

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

.github/workflows/build-pr.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17-
- uses: actions/setup-java@v1
17+
- uses: actions/setup-java@v2
1818
with:
19-
java-version: '11.x'
20-
- name: Set cache key
21-
run: |
22-
echo "CACHE_KEY=$(expr $(date +%V) - 1 + 1)-${{ github.event.pull_request.number }}" >> $GITHUB_ENV
23-
echo "PREVIOUS_CACHE_KEY=$(expr $(date +%V) - 1 + 1)" >> $GITHUB_ENV
24-
- uses: actions/cache@v2
25-
with:
26-
path: ~/.m2
27-
key: ${{ runner.os }}-maven-${{ env.CACHE_KEY }}
28-
restore-keys: |
29-
${{ runner.os }}-maven-${{ env.PREVIOUS_CACHE_KEY }}
30-
19+
java-version: '11'
20+
distribution: 'adopt'
21+
cache: 'maven'
3122
- name: Build
3223
run: mvn verify --settings .github/settings.xml -DtrimStackTrace=false
3324
env:

0 commit comments

Comments
 (0)