30
30
with :
31
31
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
32
32
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
33
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
33
+ - name : Restore existing cache
34
+ uses :
actions/[email protected] # https://github.com/actions/cache
35
+ with :
36
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
37
+ key : maven-repository-${{ hashFiles('pom.xml') }}
38
+ path : ~/.m2/repository
39
+ restore-keys : maven-repository-
34
40
- name : Run CheckStyle
35
41
run : ./src/main/scripts/execute-command.sh checkstyle
36
42
49
55
with :
50
56
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
51
57
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
52
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
58
+ - name : Restore existing cache
59
+ uses :
actions/[email protected] # https://github.com/actions/cache
60
+ with :
61
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
62
+ key : maven-repository-${{ hashFiles('pom.xml') }}
63
+ path : ~/.m2/repository
64
+ restore-keys : maven-repository-
53
65
- name : Run PMD
54
66
run : ./src/main/scripts/execute-command.sh pmd
55
67
68
80
with :
69
81
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
70
82
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
71
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
83
+ - name : Restore existing cache
84
+ uses :
actions/[email protected] # https://github.com/actions/cache
85
+ with :
86
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
87
+ key : maven-repository-${{ hashFiles('pom.xml') }}
88
+ path : ~/.m2/repository
89
+ restore-keys : maven-repository-
72
90
- name : Check license header
73
91
run : ./src/main/scripts/execute-command.sh check-license
74
92
@@ -87,7 +105,13 @@ jobs:
87
105
with :
88
106
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
89
107
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
90
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
108
+ - name : Restore existing cache
109
+ uses :
actions/[email protected] # https://github.com/actions/cache
110
+ with :
111
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
112
+ key : maven-repository-${{ hashFiles('pom.xml') }}
113
+ path : ~/.m2/repository
114
+ restore-keys : maven-repository-
91
115
- name : Check pom.xml
92
116
run : ./src/main/scripts/execute-command.sh check-pom
93
117
@@ -192,7 +216,13 @@ jobs:
192
216
with :
193
217
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
194
218
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
195
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
219
+ - name : Restore existing cache
220
+ uses :
actions/[email protected] # https://github.com/actions/cache
221
+ with :
222
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
223
+ key : maven-repository-${{ hashFiles('pom.xml') }}
224
+ path : ~/.m2/repository
225
+ restore-keys : maven-repository-
196
226
- name : Run maven-enforcer-plugin
197
227
run : ./src/main/scripts/execute-command.sh enforcer
198
228
@@ -211,7 +241,13 @@ jobs:
211
241
with :
212
242
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
213
243
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
214
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
244
+ - name : Restore existing cache
245
+ uses :
actions/[email protected] # https://github.com/actions/cache
246
+ with :
247
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
248
+ key : maven-repository-${{ hashFiles('pom.xml') }}
249
+ path : ~/.m2/repository
250
+ restore-keys : maven-repository-
215
251
- name : Compile sources
216
252
run : >-
217
253
mvn \
@@ -237,7 +273,13 @@ jobs:
237
273
with :
238
274
distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
239
275
java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
240
- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
276
+ - name : Restore existing cache
277
+ uses :
actions/[email protected] # https://github.com/actions/cache
278
+ with :
279
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
280
+ key : maven-repository-${{ hashFiles('pom.xml') }}
281
+ path : ~/.m2/repository
282
+ restore-keys : maven-repository-
241
283
- name : Compile sources
242
284
run : >-
243
285
mvn \
0 commit comments