3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2026-01-10 13:49:00 +00:00
This commit is contained in:
Marcus Boerger 2025-12-17 11:28:17 +01:00 committed by GitHub
commit f5f14e9606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -26,13 +26,18 @@ inputs:
description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache'
default: 'false'
required: false
save-on-success:
description: 'Whether the cache is written in the post action on success or (if false) is only restored'
default: 'true'
required: false
save-always:
description: 'Run the post step to save the cache even if another step before fails'
default: 'false'
required: false
deprecationMessage: |
save-always does not work as intended and will be removed in a future release.
A separate `actions/cache/restore` step should be used instead.
If you only want to control whether a new cache will be written use `save-on-success` instead.
Otherwise a separate `actions/cache/restore` step should be used instead.
See https://github.com/actions/cache/tree/main/save#always-save-cache for more details.
outputs:
cache-hit:
@ -41,7 +46,7 @@ runs:
using: 'node24'
main: 'dist/restore/index.js'
post: 'dist/save/index.js'
post-if: "success()"
post-if: "success() && github.event.inputs.save-on-success"
branding:
icon: 'archive'
color: 'gray-dark'