File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,13 @@ async function restore(ccacheVariant : string) : Promise<void> {
17
17
const inputs = {
18
18
primaryKey : core . getInput ( "key" ) ,
19
19
// https://github.com/actions/cache/blob/73cb7e04054996a98d39095c0b7821a73fb5b3ea/src/utils/actionUtils.ts#L56
20
- restoreKeys : core . getInput ( "restore-keys" ) . split ( "\n" ) . map ( s => s . trim ( ) ) . filter ( x => x !== "" )
20
+ restoreKeys : core . getInput ( "restore-keys" ) . split ( "\n" ) . map ( s => s . trim ( ) ) . filter ( x => x !== "" ) ,
21
+ appendTimestamp : core . getInput ( "append-timestamp" )
21
22
} ;
22
23
23
24
const keyPrefix = ccacheVariant + "-" ;
24
- const primaryKey = inputs . primaryKey ? keyPrefix + inputs . primaryKey + "-" : keyPrefix ;
25
- const restoreKeys = inputs . restoreKeys . map ( k => keyPrefix + k + "-" )
25
+ const primaryKey = inputs . primaryKey ? keyPrefix + ( inputs . appendTimestamp ? inputs . primaryKey + "-" : inputs . primaryKey ) : keyPrefix ;
26
+ const restoreKeys = inputs . restoreKeys . map ( k => keyPrefix + k + ( inputs . appendTimestamp ? "-" : "" ) ) ;
26
27
const paths = [ cacheDir ( ccacheVariant ) ] ;
27
28
28
29
core . saveState ( "primaryKey" , primaryKey ) ;
You can’t perform that action at this time.
0 commit comments