Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6871f0f

Browse filesBrowse files
authored
Merge pull request actions#295 from rentziass/rentziass/update-actions-core
Update @actions/core to 1.10.0
2 parents 7dff1a8 + 7ed7182 commit 6871f0f
Copy full SHA for 6871f0f

File tree

4 files changed

+47
-32
lines changed
Filter options

4 files changed

+47
-32
lines changed

‎.licenses/npm/@actions/core.dep.yml

Copy file name to clipboardExpand all lines: .licenses/npm/@actions/core.dep.yml
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js

Copy file name to clipboardExpand all lines: dist/index.js
+36-21Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5217,7 +5217,6 @@ const file_command_1 = __webpack_require__(717);
52175217
const utils_1 = __webpack_require__(278);
52185218
const os = __importStar(__webpack_require__(87));
52195219
const path = __importStar(__webpack_require__(622));
5220-
const uuid_1 = __webpack_require__(840);
52215220
const oidc_utils_1 = __webpack_require__(41);
52225221
/**
52235222
* The code to exit an action
@@ -5247,20 +5246,9 @@ function exportVariable(name, val) {
52475246
process.env[name] = convertedVal;
52485247
const filePath = process.env['GITHUB_ENV'] || '';
52495248
if (filePath) {
5250-
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
5251-
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
5252-
if (name.includes(delimiter)) {
5253-
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
5254-
}
5255-
if (convertedVal.includes(delimiter)) {
5256-
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
5257-
}
5258-
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
5259-
file_command_1.issueCommand('ENV', commandValue);
5260-
}
5261-
else {
5262-
command_1.issueCommand('set-env', { name }, convertedVal);
5249+
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
52635250
}
5251+
command_1.issueCommand('set-env', { name }, convertedVal);
52645252
}
52655253
exports.exportVariable = exportVariable;
52665254
/**
@@ -5278,7 +5266,7 @@ exports.setSecret = setSecret;
52785266
function addPath(inputPath) {
52795267
const filePath = process.env['GITHUB_PATH'] || '';
52805268
if (filePath) {
5281-
file_command_1.issueCommand('PATH', inputPath);
5269+
file_command_1.issueFileCommand('PATH', inputPath);
52825270
}
52835271
else {
52845272
command_1.issueCommand('add-path', {}, inputPath);
@@ -5318,7 +5306,10 @@ function getMultilineInput(name, options) {
53185306
const inputs = getInput(name, options)
53195307
.split('\n')
53205308
.filter(x => x !== '');
5321-
return inputs;
5309+
if (options && options.trimWhitespace === false) {
5310+
return inputs;
5311+
}
5312+
return inputs.map(input => input.trim());
53225313
}
53235314
exports.getMultilineInput = getMultilineInput;
53245315
/**
@@ -5351,8 +5342,12 @@ exports.getBooleanInput = getBooleanInput;
53515342
*/
53525343
// eslint-disable-next-line @typescript-eslint/no-explicit-any
53535344
function setOutput(name, value) {
5345+
const filePath = process.env['GITHUB_OUTPUT'] || '';
5346+
if (filePath) {
5347+
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
5348+
}
53545349
process.stdout.write(os.EOL);
5355-
command_1.issueCommand('set-output', { name }, value);
5350+
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
53565351
}
53575352
exports.setOutput = setOutput;
53585353
/**
@@ -5481,7 +5476,11 @@ exports.group = group;
54815476
*/
54825477
// eslint-disable-next-line @typescript-eslint/no-explicit-any
54835478
function saveState(name, value) {
5484-
command_1.issueCommand('save-state', { name }, value);
5479+
const filePath = process.env['GITHUB_STATE'] || '';
5480+
if (filePath) {
5481+
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
5482+
}
5483+
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
54855484
}
54865485
exports.saveState = saveState;
54875486
/**
@@ -12117,13 +12116,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
1211712116
return result;
1211812117
};
1211912118
Object.defineProperty(exports, "__esModule", { value: true });
12120-
exports.issueCommand = void 0;
12119+
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
1212112120
// We use any as a valid input type
1212212121
/* eslint-disable @typescript-eslint/no-explicit-any */
1212312122
const fs = __importStar(__webpack_require__(747));
1212412123
const os = __importStar(__webpack_require__(87));
12124+
const uuid_1 = __webpack_require__(840);
1212512125
const utils_1 = __webpack_require__(278);
12126-
function issueCommand(command, message) {
12126+
function issueFileCommand(command, message) {
1212712127
const filePath = process.env[`GITHUB_${command}`];
1212812128
if (!filePath) {
1212912129
throw new Error(`Unable to find environment variable for file command ${command}`);
@@ -12135,7 +12135,22 @@ function issueCommand(command, message) {
1213512135
encoding: 'utf8'
1213612136
});
1213712137
}
12138-
exports.issueCommand = issueCommand;
12138+
exports.issueFileCommand = issueFileCommand;
12139+
function prepareKeyValueMessage(key, value) {
12140+
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
12141+
const convertedValue = utils_1.toCommandValue(value);
12142+
// These should realistically never happen, but just in case someone finds a
12143+
// way to exploit uuid generation let's not allow keys or values that contain
12144+
// the delimiter.
12145+
if (key.includes(delimiter)) {
12146+
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
12147+
}
12148+
if (convertedValue.includes(delimiter)) {
12149+
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
12150+
}
12151+
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
12152+
}
12153+
exports.prepareKeyValueMessage = prepareKeyValueMessage;
1213912154
//# sourceMappingURL=file-command.js.map
1214012155

1214112156
/***/ }),

‎package-lock.json

Copy file name to clipboardExpand all lines: package-lock.json
+8-8Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
},
3333
"dependencies": {
34-
"@actions/core": "^1.9.1",
34+
"@actions/core": "^1.10.0",
3535
"@actions/exec": "^1.1.0",
3636
"@actions/github": "^5.0.0",
3737
"@actions/glob": "^0.2.0",
@@ -55,4 +55,4 @@
5555
"ts-jest": "^27.0.5",
5656
"typescript": "^4.3.5"
5757
}
58-
}
58+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.