Compare commits

..

2 Commits

Author SHA1 Message Date
Sergey Dolin
b917fb5fcb
Merge 0f07568d6d into db8764c1e2 2023-07-26 09:18:00 +02:00
Sergey Dolin
0f07568d6d cache-restore-only 2023-07-26 09:17:55 +02:00
4 changed files with 11 additions and 5 deletions

View File

@ -58629,6 +58629,7 @@ var State;
State["CacheMatchedKey"] = "CACHE_RESULT";
State["CacheRestoreOnly"] = "CACHE_RESTORE_ONLY";
State["True"] = "true";
State["False"] = "false";
})(State = exports.State || (exports.State = {}));
var Outputs;
(function (Outputs) {

5
dist/setup/index.js vendored
View File

@ -61294,6 +61294,7 @@ var State;
State["CacheMatchedKey"] = "CACHE_RESULT";
State["CacheRestoreOnly"] = "CACHE_RESTORE_ONLY";
State["True"] = "true";
State["False"] = "false";
})(State = exports.State || (exports.State = {}));
var Outputs;
(function (Outputs) {
@ -61730,8 +61731,8 @@ function run() {
core.debug(`add bin ${added}`);
const goPath = yield io.which('go');
const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
const cacheRestoreOnly = core.getBooleanInput('cache-dependency-path');
core.saveState(constants_1.State.CacheRestoreOnly, cacheRestoreOnly ? constants_1.State.True : '');
const cacheRestoreOnly = core.getBooleanInput('cache-restore-only');
core.saveState(constants_1.State.CacheRestoreOnly, cacheRestoreOnly ? constants_1.State.True : constants_1.State.False);
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
const packageManager = 'default';
const cacheDependencyPath = core.getInput('cache-dependency-path');

View File

@ -2,7 +2,8 @@ export enum State {
CachePrimaryKey = 'CACHE_KEY',
CacheMatchedKey = 'CACHE_RESULT',
CacheRestoreOnly = 'CACHE_RESTORE_ONLY',
True = 'true'
True = 'true',
False = 'false'
}
export enum Outputs {

View File

@ -65,8 +65,11 @@ export async function run() {
const goPath = await io.which('go');
const goVersion = (cp.execSync(`${goPath} version`) || '').toString();
const cacheRestoreOnly = core.getBooleanInput('cache-dependency-path');
core.saveState(State.CacheRestoreOnly, cacheRestoreOnly ? State.True : '');
const cacheRestoreOnly = core.getBooleanInput('cache-restore-only');
core.saveState(
State.CacheRestoreOnly,
cacheRestoreOnly ? State.True : State.False
);
if (cache && isCacheFeatureAvailable()) {
const packageManager = 'default';
const cacheDependencyPath = core.getInput('cache-dependency-path');