Fix save-always/post-if with an output

This commit is contained in:
Danny Gleckler 2024-02-08 20:07:45 -05:00
parent 0c45773b62
commit 7214f3c546
6 changed files with 65 additions and 16 deletions

View file

@ -33,11 +33,13 @@ inputs:
outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
save-always-d18d746b9:
description: "Run the post step to save the cache even if another step before fails"
runs:
using: 'node20'
main: 'dist/restore/index.js'
post: 'dist/save/index.js'
post-if: "success() || github.event.inputs.save-always"
post-if: "success() || (contains(steps.*.outputs.save-always-d18d746b9, 'true') && !contains(steps.*.outputs.save-always-d18d746b9, 'false'))"
branding:
icon: 'archive'
color: 'gray-dark'