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 cache-on-failure: true
- run: | - run: |
# cargo install cargo-deny --locked cargo install cargo-deny --locked
# cargo check cargo check
# cargo test cargo test
set
wibble

View File

@ -59993,7 +59993,11 @@ async function rm(parent, dirent) {
async function run() { async function run() {
try { 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); core.exportVariable("CARGO_INCREMENTAL", 0);
const { paths, key, restoreKeys } = await getCacheConfig(); const { paths, key, restoreKeys } = await getCacheConfig();
const bins = await getCargoBins(); const bins = await getCargoBins();

View File

@ -4,7 +4,11 @@ import { cleanTarget, getCacheConfig, getCargoBins, getPackages, stateBins, stat
async function run() { async function run() {
try { 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); core.exportVariable("CARGO_INCREMENTAL", 0);
const { paths, key, restoreKeys } = await getCacheConfig(); const { paths, key, restoreKeys } = await getCacheConfig();