File tree Expand file tree Collapse file tree 2 files changed +35
-35
lines changed Expand file tree Collapse file tree 2 files changed +35
-35
lines changed Original file line number Diff line number Diff line change 1
- name : Test cache option
1
+ name : Test actions/ cache with 'maven', 'gradle', 'sbt'
2
2
3
3
on :
4
- push :
5
- branches :
6
- - sapMachine
4
+ # push:
5
+ # branches:
6
+ # - sapMachine
7
7
workflow_dispatch :
8
8
9
9
jobs :
30
30
with :
31
31
distribution : ' sapmachine'
32
32
java-version : ' 21'
33
- cache : ${{ matrix.build-system }}
33
+
34
+
35
+ - name : Cache Maven packages
36
+ if : matrix.build-system == 'maven'
37
+ uses : actions/cache@v3
38
+ with :
39
+ path : ~/.m2/repository
40
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
41
+ restore-keys : |
42
+ ${{ runner.os }}-maven-
43
+ - name : Cache Gradle packages
44
+ if : matrix.build-system == 'gradle'
45
+ uses : actions/cache@v3
46
+ with :
47
+ path : |
48
+ ~/.gradle/caches
49
+ ~/.gradle/wrapper
50
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
51
+ restore-keys : |
52
+ ${{ runner.os }}-gradle-
53
+ - name : Cache SBT packages
54
+ if : matrix.build-system == 'sbt'
55
+ uses : actions/cache@v3
56
+ with :
57
+ path : |
58
+ ~/.sbt
59
+ key : ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt', '**/build.properties', '**/plugins.sbt') }}
60
+ restore-keys : |
61
+ ${{ runner.os }}-sbt-
34
62
35
63
- name : Build with Maven
36
64
if : matrix.build-system == 'maven'
Original file line number Diff line number Diff line change 1
- name : Test actions/ cache with 'maven', 'gradle', 'sbt'
1
+ name : Test cache option
2
2
3
3
on :
4
4
# push:
30
30
with :
31
31
distribution : ' sapmachine'
32
32
java-version : ' 21'
33
-
34
-
35
- - name : Cache Maven packages
36
- if : matrix.build-system == 'maven'
37
- uses : actions/cache@v3
38
- with :
39
- path : ~/.m2/repository
40
- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
41
- restore-keys : |
42
- ${{ runner.os }}-maven-
43
- - name : Cache Gradle packages
44
- if : matrix.build-system == 'gradle'
45
- uses : actions/cache@v3
46
- with :
47
- path : |
48
- ~/.gradle/caches
49
- ~/.gradle/wrapper
50
- key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
51
- restore-keys : |
52
- ${{ runner.os }}-gradle-
53
- - name : Cache SBT packages
54
- if : matrix.build-system == 'sbt'
55
- uses : actions/cache@v3
56
- with :
57
- path : |
58
- ~/.sbt
59
- key : ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt', '**/build.properties', '**/plugins.sbt') }}
60
- restore-keys : |
61
- ${{ runner.os }}-sbt-
33
+ cache : ${{ matrix.build-system }}
62
34
63
35
- name : Build with Maven
64
36
if : matrix.build-system == 'maven'
You can’t perform that action at this time.
0 commit comments