mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 00:33:57 +08:00
Basic implementation
This commit is contained in:
parent
6babf202a4
commit
69b8227b27
10 changed files with 320 additions and 174 deletions
10
action.yml
10
action.yml
|
@ -14,6 +14,14 @@ inputs:
|
|||
upload-chunk-size:
|
||||
description: 'The chunk size used to split up large files during upload, in bytes'
|
||||
required: false
|
||||
exit-on-cache-miss:
|
||||
description: 'Fail the workflow if the cache is not found for the primary key'
|
||||
required: false
|
||||
default: false
|
||||
save-on-any-failure:
|
||||
description: 'Save cache (on cache miss) despite of any failure during the workflow run'
|
||||
required: false
|
||||
default: false
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||
|
@ -21,7 +29,7 @@ runs:
|
|||
using: 'node16'
|
||||
main: 'dist/restore/index.js'
|
||||
post: 'dist/save/index.js'
|
||||
post-if: 'success()'
|
||||
post-if: (success() || (env.SAVE_CACHE_ON_ANY_FAILURE == 'yes'))
|
||||
branding:
|
||||
icon: 'archive'
|
||||
color: 'gray-dark'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue