Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsManta committed Oct 19, 2023
1 parent a53ed45 commit c3e5504
Show file tree
Hide file tree
Showing 5 changed files with 336 additions and 336 deletions.
30 changes: 15 additions & 15 deletions out/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17729,7 +17729,7 @@ var require_core = __commonJS({
process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`;
}
exports.addPath = addPath;
function getInput(name, options) {
function getInput2(name, options) {
const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || "";
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
Expand All @@ -17739,9 +17739,9 @@ var require_core = __commonJS({
}
return val.trim();
}
exports.getInput = getInput;
exports.getInput = getInput2;
function getMultilineInput(name, options) {
const inputs = getInput(name, options).split("\n").filter((x) => x !== "");
const inputs = getInput2(name, options).split("\n").filter((x) => x !== "");
if (options && options.trimWhitespace === false) {
return inputs;
}
Expand All @@ -17751,7 +17751,7 @@ var require_core = __commonJS({
function getBooleanInput(name, options) {
const trueValue = ["true", "True", "TRUE"];
const falseValue = ["false", "False", "FALSE"];
const val = getInput(name, options);
const val = getInput2(name, options);
if (trueValue.includes(val))
return true;
if (falseValue.includes(val))
Expand All @@ -17760,15 +17760,15 @@ var require_core = __commonJS({
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
exports.getBooleanInput = getBooleanInput;
function setOutput(name, value) {
function setOutput2(name, value) {
const filePath = process.env["GITHUB_OUTPUT"] || "";
if (filePath) {
return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value));
}
process.stdout.write(os.EOL);
command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value));
}
exports.setOutput = setOutput;
exports.setOutput = setOutput2;
function setCommandEcho(enabled) {
command_1.issue("echo", enabled ? "on" : "off");
}
Expand Down Expand Up @@ -17823,14 +17823,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
});
}
exports.group = group;
function saveState(name, value) {
function saveState2(name, value) {
const filePath = process.env["GITHUB_STATE"] || "";
if (filePath) {
return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value));
}
command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value));
}
exports.saveState = saveState;
exports.saveState = saveState2;
function getState(name) {
return process.env[`STATE_${name}`] || "";
}
Expand Down Expand Up @@ -73738,7 +73738,7 @@ var require_cache2 = __commonJS({
return !!process.env["ACTIONS_CACHE_URL"];
}
exports.isFeatureAvailable = isFeatureAvailable;
function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
function restoreCache2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
return __awaiter2(this, void 0, void 0, function* () {
checkPaths(paths);
restoreKeys = restoreKeys || [];
Expand Down Expand Up @@ -73793,7 +73793,7 @@ var require_cache2 = __commonJS({
return void 0;
});
}
exports.restoreCache = restoreCache;
exports.restoreCache = restoreCache2;
function saveCache(paths, key, options, enableCrossOsArchive = false) {
var _a, _b, _c, _d, _e;
return __awaiter2(this, void 0, void 0, function* () {
Expand Down Expand Up @@ -73860,13 +73860,13 @@ var require_cache2 = __commonJS({
});

// src/main.ts
var import_core = __toESM(require_core());
var import_cache = __toESM(require_cache2());
var core = __toESM(require_core());
var cache = __toESM(require_cache2());
(async () => {
const resultFilePath = "/tmp/result.json";
import_core.default.saveState("result-file-path", resultFilePath);
const found = !!await import_cache.default.restoreCache([resultFilePath], import_core.default.getInput("cache-key"));
import_core.default.setOutput("cache-hit", found);
core.saveState("result-file-path", resultFilePath);
const found = !!await cache.restoreCache([resultFilePath], core.getInput("cache-key"));
core.setOutput("cache-hit", found);
})();
/*! Bundled license information:

Expand Down
Loading

0 comments on commit c3e5504

Please sign in to comment.