Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use-cache=false should not be ignored for cache-restore #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dist/cache-save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82917,6 +82917,10 @@ function isCacheFeatureAvailable() {
}
return false;
}
if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache usage as use-cache is not true`);
return false;
}
return true;
}

Expand Down Expand Up @@ -82950,10 +82954,6 @@ const cacheBinary = async () => {
if (!isCacheFeatureAvailable()) {
return;
}
if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache save as use-cache is not true`);
return;
}
const state = core.getState(State.CacheMatchedKey);
const primaryKey = core.getState(State.CachePrimaryKey);
const path = core.getState(State.BinaryPath);
Expand Down
2 changes: 1 addition & 1 deletion dist/cache-save/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90242,6 +90242,10 @@ function isCacheFeatureAvailable() {
}
return false;
}
if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache usage as use-cache is not true`);
return false;
}
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/setup/index.js.map

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions src/cache-save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ export const cacheBinary = async () => {
return;
}

if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache save as use-cache is not true`);
return;
}

const state = core.getState(State.CacheMatchedKey);
const primaryKey = core.getState(State.CachePrimaryKey);
const path = core.getState(State.BinaryPath);
Expand Down
5 changes: 5 additions & 0 deletions src/cache-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ export function isCacheFeatureAvailable(): boolean {
return false;
}

if (core.getInput('use-cache') !== "true") {
core.info(`skipping cache usage as use-cache is not true`);
return false;
}

return true;
}