Skip to content

Commit 173903d

Browse files
committed
v1.20.0 - @actions/core 1.2.5 -> 1.2.6
1 parent 910e003 commit 173903d

2 files changed

Lines changed: 89 additions & 21 deletions

File tree

dist/index.js

Lines changed: 88 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,12 @@ const win2nix = (path) => {
257257
path).replace(/\\/g, '/').replace(/ /g, '\\ ')
258258
}
259259

260+
261+
// Note
262+
// https://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
260263
const updateKeyRing = async (vers) => {
261264
const dlPath = `${process.env.RUNNER_TEMP}\\srp`
262-
const uri = `http://repo.msys2.org/msys/x86_64/msys2-keyring-${vers}-any.pkg.tar.xz`
265+
const uri = `https://repo.msys2.org/msys/x86_64/msys2-keyring-${vers}-any.pkg.tar.xz`
263266
const fn = `${dlPath}\\key-ring.tar.xz`
264267
const msSt = grpSt('install updated MSYS2 keyring')
265268

@@ -731,6 +734,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
731734
};
732735
Object.defineProperty(exports, "__esModule", ({ value: true }));
733736
const os = __importStar(__webpack_require__(87));
737+
const utils_1 = __webpack_require__(718);
734738
/**
735739
* Commands
736740
*
@@ -784,28 +788,14 @@ class Command {
784788
return cmdStr;
785789
}
786790
}
787-
/**
788-
* Sanitizes an input into a string so it can be passed into issueCommand safely
789-
* @param input input to sanitize into a string
790-
*/
791-
function toCommandValue(input) {
792-
if (input === null || input === undefined) {
793-
return '';
794-
}
795-
else if (typeof input === 'string' || input instanceof String) {
796-
return input;
797-
}
798-
return JSON.stringify(input);
799-
}
800-
exports.toCommandValue = toCommandValue;
801791
function escapeData(s) {
802-
return toCommandValue(s)
792+
return utils_1.toCommandValue(s)
803793
.replace(/%/g, '%25')
804794
.replace(/\r/g, '%0D')
805795
.replace(/\n/g, '%0A');
806796
}
807797
function escapeProperty(s) {
808-
return toCommandValue(s)
798+
return utils_1.toCommandValue(s)
809799
.replace(/%/g, '%25')
810800
.replace(/\r/g, '%0D')
811801
.replace(/\n/g, '%0A')
@@ -839,6 +829,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
839829
};
840830
Object.defineProperty(exports, "__esModule", ({ value: true }));
841831
const command_1 = __webpack_require__(994);
832+
const file_command_1 = __webpack_require__(345);
833+
const utils_1 = __webpack_require__(718);
842834
const os = __importStar(__webpack_require__(87));
843835
const path = __importStar(__webpack_require__(622));
844836
/**
@@ -865,9 +857,17 @@ var ExitCode;
865857
*/
866858
// eslint-disable-next-line @typescript-eslint/no-explicit-any
867859
function exportVariable(name, val) {
868-
const convertedVal = command_1.toCommandValue(val);
860+
const convertedVal = utils_1.toCommandValue(val);
869861
process.env[name] = convertedVal;
870-
command_1.issueCommand('set-env', { name }, convertedVal);
862+
const filePath = process.env['GITHUB_ENV'] || '';
863+
if (filePath) {
864+
const delimiter = '_GitHubActionsFileCommandDelimeter_';
865+
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
866+
file_command_1.issueCommand('ENV', commandValue);
867+
}
868+
else {
869+
command_1.issueCommand('set-env', { name }, convertedVal);
870+
}
871871
}
872872
exports.exportVariable = exportVariable;
873873
/**
@@ -883,7 +883,13 @@ exports.setSecret = setSecret;
883883
* @param inputPath
884884
*/
885885
function addPath(inputPath) {
886-
command_1.issueCommand('add-path', {}, inputPath);
886+
const filePath = process.env['GITHUB_PATH'] || '';
887+
if (filePath) {
888+
file_command_1.issueCommand('PATH', inputPath);
889+
}
890+
else {
891+
command_1.issueCommand('add-path', {}, inputPath);
892+
}
887893
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
888894
}
889895
exports.addPath = addPath;
@@ -1045,6 +1051,68 @@ exports.getState = getState;
10451051

10461052
/***/ }),
10471053

1054+
/***/ 345:
1055+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1056+
1057+
"use strict";
1058+
1059+
// For internal use, subject to change.
1060+
var __importStar = (this && this.__importStar) || function (mod) {
1061+
if (mod && mod.__esModule) return mod;
1062+
var result = {};
1063+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
1064+
result["default"] = mod;
1065+
return result;
1066+
};
1067+
Object.defineProperty(exports, "__esModule", ({ value: true }));
1068+
// We use any as a valid input type
1069+
/* eslint-disable @typescript-eslint/no-explicit-any */
1070+
const fs = __importStar(__webpack_require__(747));
1071+
const os = __importStar(__webpack_require__(87));
1072+
const utils_1 = __webpack_require__(718);
1073+
function issueCommand(command, message) {
1074+
const filePath = process.env[`GITHUB_${command}`];
1075+
if (!filePath) {
1076+
throw new Error(`Unable to find environment variable for file command ${command}`);
1077+
}
1078+
if (!fs.existsSync(filePath)) {
1079+
throw new Error(`Missing file at path: ${filePath}`);
1080+
}
1081+
fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
1082+
encoding: 'utf8'
1083+
});
1084+
}
1085+
exports.issueCommand = issueCommand;
1086+
//# sourceMappingURL=file-command.js.map
1087+
1088+
/***/ }),
1089+
1090+
/***/ 718:
1091+
/***/ ((__unused_webpack_module, exports) => {
1092+
1093+
"use strict";
1094+
1095+
// We use any as a valid input type
1096+
/* eslint-disable @typescript-eslint/no-explicit-any */
1097+
Object.defineProperty(exports, "__esModule", ({ value: true }));
1098+
/**
1099+
* Sanitizes an input into a string so it can be passed into issueCommand safely
1100+
* @param input input to sanitize into a string
1101+
*/
1102+
function toCommandValue(input) {
1103+
if (input === null || input === undefined) {
1104+
return '';
1105+
}
1106+
else if (typeof input === 'string' || input instanceof String) {
1107+
return input;
1108+
}
1109+
return JSON.stringify(input);
1110+
}
1111+
exports.toCommandValue = toCommandValue;
1112+
//# sourceMappingURL=utils.js.map
1113+
1114+
/***/ }),
1115+
10481116
/***/ 79:
10491117
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10501118

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"author": "MSP-Greg",
2424
"license": "MIT",
2525
"dependencies": {
26-
"@actions/core": "^1.2.5",
26+
"@actions/core": "^1.2.6",
2727
"@actions/http-client": "^1.0.8"
2828
}
2929
}

0 commit comments

Comments
 (0)