Skip to content

Commit d60b90d

Browse files
committed
feat: adds cache-on-failure propagation
1 parent b113a30 commit d60b90d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Afterward, the `components` and `target` specified via inputs are installed in a
5555
| `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | |
5656
| `cache` | Automatically configure Rust cache (using `Swatinem/rust-cache`) | true |
5757
| `cache-workspaces` | Propagates the value to `Swatinem/rust-cache` | |
58+
| `cache-on-failure` | Propagates the value to `Swatinem/rust-cache` | |
5859
| `matcher` | Enable problem matcher to surface build messages and formatting issues | true |
5960
| `rustflags` | Set the value of `RUSTFLAGS` (set to empty string to avoid overwriting existing flags) | "-D warnings" |
6061

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ inputs:
2828
cache-workspaces:
2929
description: "Paths to multiple Cargo workspaces and their target directories, separated by newlines."
3030
required: false
31+
cache-on-failure:
32+
description: "Also cache on workflow failures"
33+
default: "false"
34+
required: false
3135
matcher:
3236
description: "Enable the Rust problem matcher"
3337
required: false
@@ -176,3 +180,4 @@ runs:
176180
uses: Swatinem/rust-cache@v2
177181
with:
178182
workspaces: ${{inputs.cache-workspaces}}
183+
cache-on-failure: ${{inputs.cache-on-failure}}

0 commit comments

Comments
 (0)