feat: add cache-save-if input to propagate save-if to Swatinem/rust-cache

This commit is contained in:
ChanTsune committed 2026-04-11 23:57:43 +09:00
1 parent d197c15826
commit 186b99ef06
2 files changed
+6

No files matched your search

+1
View File
@@ -63,6 +63,7 @@ Afterward, the `components` and `target` specified via inputs are installed in a
| `cache-provider` | Propagates the value to [`Swatinem/rust-cache`] as `cache-provider` | 'github' |
| `cache-all-crates` | Propagates the value to [`Swatinem/rust-cache`] as `cache-all-crates` | false |
| `cache-workspace-crates` | Propagates the value to [`Swatinem/rust-cache`] as `cache-workspace-crates` | false |
| `cache-save-if` | Propagates the value to [`Swatinem/rust-cache`] as `save-if` | true |
| `matcher` | Enable problem matcher to surface build messages and formatting issues | true |
| `rustflags` | Set the value of `RUSTFLAGS` (set to empty string to avoid overwriting existing flags) | "-D warnings" |
| `override` | Setup the last installed toolchain as the default via `rustup override` | true |
+5
View File
@@ -57,6 +57,10 @@ inputs:
description: "Determines which crates are cached. If `true` all crates will be cached, otherwise only dependent crates will be cached."
required: false
default: "false"
cache-save-if:
description: "Determines whether the cache should be saved. If `false`, the cache is only restored."
required: false
default: "true"
matcher:
description: "Enable the Rust problem matcher"
required: false
@@ -248,5 +252,6 @@ runs:
cache-provider: ${{inputs.cache-provider}}
cache-all-crates: ${{inputs.cache-all-crates}}
cache-workspace-crates: ${{inputs.cache-workspace-crates}}
save-if: ${{inputs.cache-save-if}}
key: ${{inputs.cache-key}}
shared-key: ${{inputs.cache-shared-key}}