1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-04 13:37:46 +02:00

Changed input value

This commit is contained in:
Sankalp Kotewar 2022-11-22 07:22:26 +00:00 committed by GitHub
parent c451e92c29
commit 78b088d460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -17,7 +17,7 @@ inputs:
strict-restore: strict-restore:
description: 'Fail the workflow if the cache is not found for the given key.' description: 'Fail the workflow if the cache is not found for the given key.'
required: false required: false
default: "false" default: "no"
save-cache-on-any-failure: save-cache-on-any-failure:
description: 'Save cache despite of any failure in the build steps' description: 'Save cache despite of any failure in the build steps'
required: false required: false

View file

@ -48998,7 +48998,7 @@ function run() {
core.info(`Input Variable ${constants_1.Variables.SaveCacheOnAnyFailure} is set to yes, the cache will be saved despite of any failure in the build.`); core.info(`Input Variable ${constants_1.Variables.SaveCacheOnAnyFailure} is set to yes, the cache will be saved despite of any failure in the build.`);
} }
if (!cacheKey) { if (!cacheKey) {
if (core.getInput(constants_1.Inputs.StrictRestore) == "true") { if (core.getInput(constants_1.Inputs.StrictRestore) == "yes") {
throw new Error(`Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the strict-restore requirement is not met.`); throw new Error(`Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the strict-restore requirement is not met.`);
} }
core.info(`Cache not found for input keys: ${[ core.info(`Cache not found for input keys: ${[
@ -49011,7 +49011,7 @@ function run() {
utils.setCacheState(cacheKey); utils.setCacheState(cacheKey);
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey); const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
utils.setCacheHitOutput(isExactKeyMatch); utils.setCacheHitOutput(isExactKeyMatch);
if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "true") { if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "yes") {
throw new Error(`Restored cache key doesn't match the given input key ${primaryKey}, hence exiting the workflow as the strict-restore requirement is not met.`); throw new Error(`Restored cache key doesn't match the given input key ${primaryKey}, hence exiting the workflow as the strict-restore requirement is not met.`);
} }
core.info(`Cache restored from key: ${cacheKey}`); core.info(`Cache restored from key: ${cacheKey}`);

View file

@ -46,7 +46,7 @@ async function run(): Promise<void> {
} }
if (!cacheKey) { if (!cacheKey) {
if (core.getInput(Inputs.StrictRestore) == "true") { if (core.getInput(Inputs.StrictRestore) == "yes") {
throw new Error( throw new Error(
`Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the strict-restore requirement is not met.` `Cache with the given input key ${primaryKey} is not found, hence exiting the workflow as the strict-restore requirement is not met.`
); );
@ -67,7 +67,7 @@ async function run(): Promise<void> {
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey); const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
utils.setCacheHitOutput(isExactKeyMatch); utils.setCacheHitOutput(isExactKeyMatch);
if (!isExactKeyMatch && core.getInput(Inputs.StrictRestore) == "true") { if (!isExactKeyMatch && core.getInput(Inputs.StrictRestore) == "yes") {
throw new Error( throw new Error(
`Restored cache key doesn't match the given input key ${primaryKey}, hence exiting the workflow as the strict-restore requirement is not met.` `Restored cache key doesn't match the given input key ${primaryKey}, hence exiting the workflow as the strict-restore requirement is not met.`
); );