Skip to content

Commit 3732f1d

Browse files
committed
allow skipping saving the layers
1 parent 0c6d193 commit 3732f1d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ inputs:
1111
required: true
1212
default: docker-layer-caching-${{ github.workflow }}-{hash}
1313
restore-keys:
14-
description: An ordered list of keys to use for restoring the cache if no cache hit occurred for key
14+
description: An ordered list of keys to use for restoring the cache if no cache hit occurred for key
1515
required: false
1616
default: docker-layer-caching-${{ github.workflow }}-
1717
concurrency:
1818
description: The number of concurrency when restoring and saving layers
1919
required: true
2020
default: '4'
21+
skip-save:
22+
description: Skip saving layers in the post step
23+
required: false
24+
default: false
2125

2226
runs:
2327
using: node12

post.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { LayerCache } from './src/LayerCache'
55
import { ImageDetector } from './src/ImageDetector'
66
import { assertType } from 'typescript-is'
77
const main = async () => {
8+
if (core.getInput('skip-save')) {
9+
core.info('Skipping save.')
10+
return
11+
}
12+
813
const primaryKey = core.getInput('key', { required: true })
914
const restoredKey = JSON.parse(core.getState(`restored-key`)) as string
1015

0 commit comments

Comments
 (0)