From 2cc80e8d366acec2a632c71b80500b51e91d6370 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Fri, 21 Oct 2022 12:20:01 +0200 Subject: [PATCH] Configurable save cache: GHA_CACHE_SAVE=success|always|never --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3e158e3..c6cecba 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,9 @@ runs: using: 'node16' main: 'dist/restore/index.js' post: 'dist/save/index.js' - post-if: 'success()' + post-if: | + ((env.GHA_CACHE_SAVE == 'always') && (success() || failure())) || + ((env.GHA_CACHE_SAVE != 'never') && success()) branding: icon: 'archive' color: 'gray-dark'