forked from coursier/cache-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
125 lines (125 loc) · 4.81 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: 'coursier-cache-action'
description: 'Restores and saves the coursier cache'
author: 'Alexandre Archambault'
branding:
icon: 'arrow-down'
color: 'white'
inputs:
root:
required: false
description: >
Root directory containing build definition sources (build.sbt, build.sc, etc.)
If the sbt or mill build definition files are in a sub-directory, pass the path to this
sub-directory here.
default: '.'
path:
required: false
description: >
Override for the path of the coursier cache.
By default, the coursier cache is assumed to be in the default OS-dependent location.
Set this input to override that. Note that this action will also set COURSIER_CACHE
if an override is specified, so that you don't have to set it yourself.
default: ''
job:
required: false
description: >
Job name, to be used in the cache key, so that each job has its own cache.
default: '${{ github.job }}'
matrix:
required: false
description: >
Matrix values, when using the matrix strategy.
When using build matrices for more than the OS (for Scala versions, JDKs, test suites, …),
pass the matrix values here, with `matrix: -dollar-{{ toJson(matrix) }}`. The matrix instance is hashed,
and added to the cache key, so that each matrix instance has its own cache, and those caches don't
collide.
default: '${{ toJson(matrix) }}'
extraFiles:
required: false
description: >
Extra files to take into account in the cache key.
By default, sbt build definition files (*.sbt, project/**.{scala,sbt}, project/build.properties) and
mill build definition files (*.sc, ./mill) are hashed to uniquely identify the cached data. Upon
cache restoration, if an exact match is found, the cache is not saved again at the end of the job.
In case of no exact match, it is assumed new files may have been fetched; the previous cache for the
current OS, if any, is restored, but a new cache is persisted with a new key at the end of the job.
To take into account extra files in the cache key, pass via extraFiles either
- a single path as a string
- multiple paths in a JSON array, encoded in a string
Blobs are accepted (processed by [glob-all](https://www.npmjs.com/package/glob-all)).
default: ''
extraKey:
required: false
description: >
Extra value to be appended to the coursier cache key.
See extraFiles for more details.
default: ''
extraHashedContent:
required: false
description: >
Extra content to take into account in the cache key.
See extraFiles for more details.
The content of extraHashedContent is taken into account in the hash for the coursier cache key.
default: ''
extraSbtFiles:
required: false
description: >
Extra sbt files to take into account in the sbt cache key. Same format as extraFiles.
default: ''
extraSbtKey:
required: false
description: >
Extra value to be appended to the sbt cache key.
See extraFiles for more details.
default: ''
extraSbtHashedContent:
required: false
description: >
Extra content to take into account in the sbt cache key. Same format as extraHashedContent.
default: ''
extraMillFiles:
required: false
description: >
Extra mill files to take into account in the mill cache key. Same format as extraFiles.
default: ''
extraMillKey:
required: false
description: >
Extra value to be appended to the mill cache key.
See extraFiles for more details.
default: ''
extraMillHashedContent:
required: false
description: >
Extra content to take into account in the mill cache key. Same format as extraHashedContent.
default: ''
ammoniteScripts:
required: false
description: >
Ammonite scripts to take into account in the Ammonite cache key. Same format as extraFiles.
default: ''
extraAmmoniteKey:
required: false
description: >
Extra value to be appended to the Ammonite cache key.
See extraFiles for more details.
default: ''
extraAmmoniteHashedContent:
required: false
description: >
Extra content to take into account in the Ammonite cache key. Same format as extraHashedContent.
default: ''
outputs:
cache-hit-coursier:
description: 'A boolean value to indicate a match was found for the coursier cache'
cache-hit-sbt-ivy2-cache:
description: 'A boolean value to indicate a match was found for the sbt-ivy2-cache cache'
cache-hit-mill:
description: 'A boolean value to indicate a match was found for the mill cache'
cache-hit-ammonite:
description: 'A boolean value to indicate a match was found for the ammonite cache'
runs:
using: 'node16'
main: 'dist/restore/index.js'
post: 'dist/save/index.js'
post-if: 'success()'