Skip to content

Commit

Permalink
Merge pull request #21 from btkostner/skip-save
Browse files Browse the repository at this point in the history
allow skipping saving the layers
  • Loading branch information
satackey authored Aug 15, 2020
2 parents 0c6d193 + d5e9713 commit df1a729
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ inputs:
required: true
default: docker-layer-caching-${{ github.workflow }}-{hash}
restore-keys:
description: An ordered list of keys to use for restoring the cache if no cache hit occurred for key
description: An ordered list of keys to use for restoring the cache if no cache hit occurred for key
required: false
default: docker-layer-caching-${{ github.workflow }}-
concurrency:
description: The number of concurrency when restoring and saving layers
required: true
default: '4'
skip-save:
description: Skip saving layers in the post step
required: false
default: 'false'

runs:
using: node12
Expand Down
6 changes: 6 additions & 0 deletions post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import exec from 'actions-exec-listener'
import { LayerCache } from './src/LayerCache'
import { ImageDetector } from './src/ImageDetector'
import { assertType } from 'typescript-is'

const main = async () => {
if (JSON.parse(core.getInput('skip-save', { required: true }))) {
core.info('Skipping save.')
return
}

const primaryKey = core.getInput('key', { required: true })
const restoredKey = JSON.parse(core.getState(`restored-key`)) as string

Expand Down

0 comments on commit df1a729

Please sign in to comment.