diff --git a/README.md b/README.md index 50bb949..93e561f 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,12 @@ default: `false` If `true`, disable saving cache upon cache miss. +#### `save-always` + +default: `false` + +If `true`, run the post step to save the cache even if another step before fails. + ## Outputs ### `cache-hit` diff --git a/action.yaml b/action.yaml index 720b07f..5cd967d 100644 --- a/action.yaml +++ b/action.yaml @@ -15,6 +15,10 @@ inputs: description: If "true", disables saving the cache upon cache miss required: false default: "false" + save-always: + description: "Run the post step to save the cache even if another step before fails" + required: false + default: "false" outputs: cache-hit: description: > @@ -23,5 +27,5 @@ outputs: runs: using: node20 main: dist/main/index.js - post-if: success() + post-if: "success() || github.event.inputs.save-always" post: dist/post/index.js