diff --git a/action.yml b/action.yml index a4d1958..1c9e8fc 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,9 @@ inputs: target-dir: description: "The target dir that should be cleaned and persisted, defaults to `./target`" required: false + cache-on-failure: + description: "Cache even if the build fails. Defaults to false" + required: false outputs: cache-hit: description: "A boolean value that indicates an exact match was found" @@ -21,7 +24,7 @@ runs: using: "node12" main: "dist/restore/index.js" post: "dist/save/index.js" - post-if: "success()" + post-if: "success() || env.INPUT_CACHE_ON_FAILURE === 'true'" branding: icon: "archive" color: "gray-dark"