From b1378c8403e6779ec61a229f419bc68c0e118f02 Mon Sep 17 00:00:00 2001 From: to-s <26573402+to-s@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:58:52 +0200 Subject: [PATCH 1/3] added save-always input --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5c6fa87..a957b45 100644 --- a/action.yml +++ b/action.yml @@ -26,6 +26,10 @@ 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-always: + description: 'Run the post step to save the cache even if another step before fails' + default: 'false' + required: false outputs: cache-hit: description: 'A boolean value to indicate an exact match was found for the primary key' @@ -33,7 +37,7 @@ runs: using: 'node16' main: 'dist/restore/index.js' post: 'dist/save/index.js' - post-if: success() + post-if: "success() || github.event.inputs.save-always" branding: icon: 'archive' color: 'gray-dark' From 3b7dac178930b57d9cbc4851053f927571e65979 Mon Sep 17 00:00:00 2001 From: to-s <26573402+to-s@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:23:38 +0100 Subject: [PATCH 2/3] Update action.yml Co-authored-by: Tomasz Janiszewski --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a957b45..2bc2453 100644 --- a/action.yml +++ b/action.yml @@ -37,7 +37,7 @@ runs: using: 'node16' main: 'dist/restore/index.js' post: 'dist/save/index.js' - post-if: "success() || github.event.inputs.save-always" + post-if: "github.event.inputs.save-always" branding: icon: 'archive' color: 'gray-dark' From 0e9aed0d0d8123bb9d12426b86a761cf9d0c4cff Mon Sep 17 00:00:00 2001 From: to-s Date: Thu, 9 Nov 2023 00:31:17 +0100 Subject: [PATCH 3/3] Revert "Update action.yml" This reverts commit 3b7dac178930b57d9cbc4851053f927571e65979. --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2bc2453..a957b45 100644 --- a/action.yml +++ b/action.yml @@ -37,7 +37,7 @@ runs: using: 'node16' main: 'dist/restore/index.js' post: 'dist/save/index.js' - post-if: "github.event.inputs.save-always" + post-if: "success() || github.event.inputs.save-always" branding: icon: 'archive' color: 'gray-dark'