mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Add exportVariable to ActionsEnv
This commit is contained in:
14
lib/entry-points.js
generated
14
lib/entry-points.js
generated
@@ -21559,7 +21559,7 @@ var require_core = __commonJS({
|
||||
};
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0;
|
||||
exports2.exportVariable = exportVariable15;
|
||||
exports2.exportVariable = exportVariable16;
|
||||
exports2.setSecret = setSecret2;
|
||||
exports2.addPath = addPath2;
|
||||
exports2.getInput = getInput2;
|
||||
@@ -21591,7 +21591,7 @@ var require_core = __commonJS({
|
||||
ExitCode2[ExitCode2["Success"] = 0] = "Success";
|
||||
ExitCode2[ExitCode2["Failure"] = 1] = "Failure";
|
||||
})(ExitCode || (exports2.ExitCode = ExitCode = {}));
|
||||
function exportVariable15(name, val) {
|
||||
function exportVariable16(name, val) {
|
||||
const convertedVal = (0, utils_1.toCommandValue)(val);
|
||||
process.env[name] = convertedVal;
|
||||
const filePath = process.env["GITHUB_ENV"] || "";
|
||||
@@ -121026,7 +121026,7 @@ var require_core3 = __commonJS({
|
||||
ExitCode2[ExitCode2["Success"] = 0] = "Success";
|
||||
ExitCode2[ExitCode2["Failure"] = 1] = "Failure";
|
||||
})(ExitCode || (exports2.ExitCode = ExitCode = {}));
|
||||
function exportVariable15(name, val) {
|
||||
function exportVariable16(name, val) {
|
||||
const convertedVal = (0, utils_1.toCommandValue)(val);
|
||||
process.env[name] = convertedVal;
|
||||
const filePath = process.env["GITHUB_ENV"] || "";
|
||||
@@ -121035,7 +121035,7 @@ var require_core3 = __commonJS({
|
||||
}
|
||||
(0, command_1.issueCommand)("set-env", { name }, convertedVal);
|
||||
}
|
||||
exports2.exportVariable = exportVariable15;
|
||||
exports2.exportVariable = exportVariable16;
|
||||
function setSecret2(secret) {
|
||||
(0, command_1.issueCommand)("add-mask", {}, secret);
|
||||
}
|
||||
@@ -145383,7 +145383,11 @@ var Failure = class {
|
||||
|
||||
// src/actions-util.ts
|
||||
function getActionsEnv() {
|
||||
return { getRequiredInput, getOptionalInput };
|
||||
return {
|
||||
getRequiredInput,
|
||||
getOptionalInput,
|
||||
exportVariable: core3.exportVariable
|
||||
};
|
||||
}
|
||||
var getRequiredInput = function(name) {
|
||||
const value = core3.getInput(name);
|
||||
|
||||
@@ -29,13 +29,18 @@ declare const __CODEQL_ACTION_VERSION__: string;
|
||||
export interface ActionsEnv {
|
||||
getRequiredInput: (name: string) => string;
|
||||
getOptionalInput: (name: string) => string | undefined;
|
||||
exportVariable: (name: string, value: string) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the real `ActionsEnv` used by production code.
|
||||
*/
|
||||
export function getActionsEnv(): ActionsEnv {
|
||||
return { getRequiredInput, getOptionalInput };
|
||||
return {
|
||||
getRequiredInput,
|
||||
getOptionalInput,
|
||||
exportVariable: core.exportVariable,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -191,6 +191,7 @@ export function getTestActionsEnv(): ActionsEnv {
|
||||
throw new Error(`Input required and not supplied: ${name}`);
|
||||
},
|
||||
getOptionalInput: () => undefined,
|
||||
exportVariable: () => {},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user