Skip to content

Commit 01a8f4d

Browse files
authored
Improved github actions.
1 parent 14fa42f commit 01a8f4d

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/maven.yml

+8-17
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,21 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
with:
2121
fetch-depth: 0
2222
- name: Set up JDK 11
23-
uses: actions/setup-java@v2
23+
uses: actions/setup-java@v3
2424
with:
2525
distribution: 'temurin'
2626
java-version: '11'
2727
cache: 'gradle'
2828
- name: Cache SonarCloud packages
29-
uses: actions/cache@v1
29+
uses: actions/cache@v3
3030
with:
3131
path: ~/.sonar/cache
3232
key: ${{ runner.os }}-sonar
3333
restore-keys: ${{ runner.os }}-sonar
34-
- uses: actions/cache@v1
35-
with:
36-
path: ~/.gradle/caches
37-
key: ${{ runner.os }}-gradle
38-
restore-keys: ${{ runner.os }}-gradle
3934
- name: Build with Gradle
4035
env:
4136
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -68,18 +63,14 @@ jobs:
6863
name: Build
6964
runs-on: ubuntu-latest
7065
steps:
71-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v3
7267
with:
7368
fetch-depth: 0
7469
- name: Set up JDK 11
75-
uses: actions/setup-java@v1
76-
with:
77-
java-version: 11
78-
- name: Cache Maven packages
79-
uses: actions/cache@v1
70+
uses: actions/setup-java@v3
8071
with:
81-
path: ~/.m2
82-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
83-
restore-keys: ${{ runner.os }}-m2
72+
distribution: 'temurin'
73+
java-version: '11'
74+
cache: 'maven'
8475
- name: Build and analyze
8576
run: mvn -B compile

0 commit comments

Comments
 (0)