3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-04-18 09:49:02 +00:00

Actually check whether to do cache-on-failure

This commit is contained in:
Tom Parker-Shemilt 2021-06-27 18:24:24 +01:00
parent 8b100854e9
commit cf9cfbbe54
3 changed files with 13 additions and 7 deletions

View file

@ -26,8 +26,6 @@ jobs:
cache-on-failure: true
- run: |
# cargo install cargo-deny --locked
# cargo check
# cargo test
set
wibble
cargo install cargo-deny --locked
cargo check
cargo test

View file

@ -59993,7 +59993,11 @@ async function rm(parent, dirent) {
async function run() {
try {
core.exportVariable("CACHE_ON_FAILURE", "true");
var cacheOnFailure = core.getInput("cache-on-failure").toLowerCase();
if (cacheOnFailure !== "true") {
cacheOnFailure = "false";
}
core.exportVariable("CACHE_ON_FAILURE", cacheOnFailure);
core.exportVariable("CARGO_INCREMENTAL", 0);
const { paths, key, restoreKeys } = await getCacheConfig();
const bins = await getCargoBins();

View file

@ -4,7 +4,11 @@ import { cleanTarget, getCacheConfig, getCargoBins, getPackages, stateBins, stat
async function run() {
try {
core.exportVariable("CACHE_ON_FAILURE", "true")
var cacheOnFailure = core.getInput("cache-on-failure").toLowerCase()
if (cacheOnFailure !== "true") {
cacheOnFailure = "false"
}
core.exportVariable("CACHE_ON_FAILURE", cacheOnFailure)
core.exportVariable("CARGO_INCREMENTAL", 0);
const { paths, key, restoreKeys } = await getCacheConfig();