1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2024-12-23 12:36:01 +01:00

Merge pull request #1242 from to-s/main

feat: save-always flag
This commit is contained in:
Rob Herley 2024-01-16 14:54:22 -05:00 committed by GitHub
commit 13aacd865c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,6 +26,10 @@ inputs:
description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache' description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache'
default: 'false' default: 'false'
required: false required: false
save-always:
description: 'Run the post step to save the cache even if another step before fails'
default: 'false'
required: false
outputs: outputs:
cache-hit: cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key' description: 'A boolean value to indicate an exact match was found for the primary key'
@ -33,7 +37,7 @@ runs:
using: 'node20' using: 'node20'
main: 'dist/restore/index.js' main: 'dist/restore/index.js'
post: 'dist/save/index.js' post: 'dist/save/index.js'
post-if: success() post-if: "success() || github.event.inputs.save-always"
branding: branding:
icon: 'archive' icon: 'archive'
color: 'gray-dark' color: 'gray-dark'