From d4aa91f78d74e38ec928590ebdef7a4c327b72e9 Mon Sep 17 00:00:00 2001 From: Matthew Greenwald <1819760+mdgreenwald@users.noreply.github.com> Date: Wed, 9 Mar 2022 21:51:50 -0500 Subject: [PATCH] Publishing new version (#108) Signed-off-by: Matthew Greenwald --- dist/index.js | 342 +++++++++++++++++++++++++++++++++++++++----------- lib/run.js | 12 +- 2 files changed, 275 insertions(+), 79 deletions(-) diff --git a/dist/index.js b/dist/index.js index b57abe3..0031c1d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10,7 +10,11 @@ // Licensed under the MIT license. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -37,15 +41,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const os = __importStar(__nccwpck_require__(2087)); -const path = __importStar(__nccwpck_require__(5622)); -const util = __importStar(__nccwpck_require__(1669)); -const fs = __importStar(__nccwpck_require__(5747)); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); +const util = __importStar(__nccwpck_require__(3837)); +const fs = __importStar(__nccwpck_require__(7147)); const semver = __importStar(__nccwpck_require__(1383)); const toolCache = __importStar(__nccwpck_require__(7784)); const core = __importStar(__nccwpck_require__(2186)); const sopsToolName = 'sops'; -const stableSopsVersion = 'v3.5.0'; +const stableSopsVersion = 'v3.7.2'; const sopsAllReleasesUrl = 'https://api.github.com/repos/mozilla/sops/releases'; function getExecutableExtension() { if (os.type().match(/^Win/)) { @@ -56,9 +60,9 @@ function getExecutableExtension() { function getSopsDownloadURL(version) { switch (os.type()) { case 'Linux': - return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.linux', version, version); + return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.linux.amd64', version, version); case 'Darwin': - return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.darwin', version, version); + return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.darwin.amd64', version, version); case 'Windows_NT': default: return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.exe', version, version); @@ -195,7 +199,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(2087)); +const os = __importStar(__nccwpck_require__(2037)); const utils_1 = __nccwpck_require__(5278); /** * Commands @@ -302,12 +306,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = __nccwpck_require__(7351); const file_command_1 = __nccwpck_require__(717); const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(2087)); -const path = __importStar(__nccwpck_require__(5622)); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); +const oidc_utils_1 = __nccwpck_require__(8041); /** * The code to exit an action */ @@ -480,19 +485,30 @@ exports.debug = debug; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function error(message) { - command_1.issue('error', message instanceof Error ? message.toString() : message); +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** - * Adds an warning issue + * Adds a warning issue * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function warning(message) { - command_1.issue('warning', message instanceof Error ? message.toString() : message); +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; /** * Writes info to log with console.log. * @param message info message @@ -565,6 +581,12 @@ function getState(name) { return process.env[`STATE_${name}`] || ''; } exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; //# sourceMappingURL=core.js.map /***/ }), @@ -598,8 +620,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issueCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(5747)); -const os = __importStar(__nccwpck_require__(2087)); +const fs = __importStar(__nccwpck_require__(7147)); +const os = __importStar(__nccwpck_require__(2037)); const utils_1 = __nccwpck_require__(5278); function issueCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -618,6 +640,90 @@ exports.issueCommand = issueCommand; /***/ }), +/***/ 8041: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require__(9925); +const auth_1 = __nccwpck_require__(3702); +const core_1 = __nccwpck_require__(2186); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + /***/ 5278: /***/ ((__unused_webpack_module, exports) => { @@ -626,7 +732,7 @@ exports.issueCommand = issueCommand; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCommandValue = void 0; +exports.toCommandProperties = exports.toCommandValue = void 0; /** * Sanitizes an input into a string so it can be passed into issueCommand safely * @param input input to sanitize into a string @@ -641,6 +747,26 @@ function toCommandValue(input) { return JSON.stringify(input); } exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; //# sourceMappingURL=utils.js.map /***/ }), @@ -680,7 +806,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(4304); +const string_decoder_1 = __nccwpck_require__(1576); const tr = __importStar(__nccwpck_require__(8159)); /** * Exec a command. @@ -790,13 +916,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(2087)); -const events = __importStar(__nccwpck_require__(8614)); -const child = __importStar(__nccwpck_require__(3129)); -const path = __importStar(__nccwpck_require__(5622)); +const os = __importStar(__nccwpck_require__(2037)); +const events = __importStar(__nccwpck_require__(2361)); +const child = __importStar(__nccwpck_require__(2081)); +const path = __importStar(__nccwpck_require__(1017)); const io = __importStar(__nccwpck_require__(7436)); const ioUtil = __importStar(__nccwpck_require__(1962)); -const timers_1 = __nccwpck_require__(8213); +const timers_1 = __nccwpck_require__(9512); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -1378,6 +1504,72 @@ class ExecState extends events.EventEmitter { } //# sourceMappingURL=toolrunner.js.map +/***/ }), + +/***/ 3702: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + + Buffer.from(this.username + ':' + this.password).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = 'Bearer ' + this.token; + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + options.headers['Authorization'] = + 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); + } + // This handler cannot handle 401 + canHandleAuthentication(response) { + return false; + } + handleAuthentication(httpClient, requestInfo, objs) { + return null; + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + + /***/ }), /***/ 9925: @@ -1386,8 +1578,8 @@ class ExecState extends events.EventEmitter { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const http = __nccwpck_require__(8605); -const https = __nccwpck_require__(7211); +const http = __nccwpck_require__(3685); +const https = __nccwpck_require__(5687); const pm = __nccwpck_require__(6443); let tunnel; var HttpCodes; @@ -2026,8 +2218,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(5747)); -const path = __importStar(__nccwpck_require__(5622)); +const fs = __importStar(__nccwpck_require__(7147)); +const path = __importStar(__nccwpck_require__(1017)); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === 'win32'; function exists(fsPath) { @@ -2209,10 +2401,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(2357); -const childProcess = __importStar(__nccwpck_require__(3129)); -const path = __importStar(__nccwpck_require__(5622)); -const util_1 = __nccwpck_require__(1669); +const assert_1 = __nccwpck_require__(9491); +const childProcess = __importStar(__nccwpck_require__(2081)); +const path = __importStar(__nccwpck_require__(1017)); +const util_1 = __nccwpck_require__(3837); const ioUtil = __importStar(__nccwpck_require__(1962)); const exec = util_1.promisify(childProcess.exec); const execFile = util_1.promisify(childProcess.execFile); @@ -2561,9 +2753,9 @@ const semver = __importStar(__nccwpck_require__(562)); const core_1 = __nccwpck_require__(2186); // needs to be require for core node modules to be mocked /* eslint @typescript-eslint/no-require-imports: 0 */ -const os = __nccwpck_require__(2087); -const cp = __nccwpck_require__(3129); -const fs = __nccwpck_require__(5747); +const os = __nccwpck_require__(2037); +const cp = __nccwpck_require__(2081); +const fs = __nccwpck_require__(7147); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter(this, void 0, void 0, function* () { const platFilter = os.platform(); @@ -2787,17 +2979,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0; const core = __importStar(__nccwpck_require__(2186)); const io = __importStar(__nccwpck_require__(2940)); -const fs = __importStar(__nccwpck_require__(5747)); +const fs = __importStar(__nccwpck_require__(7147)); const mm = __importStar(__nccwpck_require__(2473)); -const os = __importStar(__nccwpck_require__(2087)); -const path = __importStar(__nccwpck_require__(5622)); +const os = __importStar(__nccwpck_require__(2037)); +const path = __importStar(__nccwpck_require__(1017)); const httpm = __importStar(__nccwpck_require__(9925)); const semver = __importStar(__nccwpck_require__(562)); -const stream = __importStar(__nccwpck_require__(2413)); -const util = __importStar(__nccwpck_require__(1669)); +const stream = __importStar(__nccwpck_require__(2781)); +const util = __importStar(__nccwpck_require__(3837)); const v4_1 = __importDefault(__nccwpck_require__(824)); const exec_1 = __nccwpck_require__(1514); -const assert_1 = __nccwpck_require__(2357); +const assert_1 = __nccwpck_require__(9491); const retry_helper_1 = __nccwpck_require__(8279); class HTTPError extends Error { constructor(httpStatusCode) { @@ -3455,8 +3647,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(5747)); -const path = __importStar(__nccwpck_require__(5622)); +const fs = __importStar(__nccwpck_require__(7147)); +const path = __importStar(__nccwpck_require__(1017)); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === 'win32'; function exists(fsPath) { @@ -3638,10 +3830,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(2357); -const childProcess = __importStar(__nccwpck_require__(3129)); -const path = __importStar(__nccwpck_require__(5622)); -const util_1 = __nccwpck_require__(1669); +const assert_1 = __nccwpck_require__(9491); +const childProcess = __importStar(__nccwpck_require__(2081)); +const path = __importStar(__nccwpck_require__(1017)); +const util_1 = __nccwpck_require__(3837); const ioUtil = __importStar(__nccwpck_require__(71)); const exec = util_1.promisify(childProcess.exec); const execFile = util_1.promisify(childProcess.execFile); @@ -7275,10 +7467,10 @@ module.exports = { re: internalRe.re, src: internalRe.src, tokens: internalRe.t, - SEMVER_SPEC_VERSION: __nccwpck_require__(2293).SEMVER_SPEC_VERSION, + SEMVER_SPEC_VERSION: (__nccwpck_require__(2293).SEMVER_SPEC_VERSION), SemVer: __nccwpck_require__(8088), - compareIdentifiers: __nccwpck_require__(2463).compareIdentifiers, - rcompareIdentifiers: __nccwpck_require__(2463).rcompareIdentifiers, + compareIdentifiers: (__nccwpck_require__(2463).compareIdentifiers), + rcompareIdentifiers: (__nccwpck_require__(2463).rcompareIdentifiers), parse: __nccwpck_require__(5925), valid: __nccwpck_require__(9601), clean: __nccwpck_require__(8848), @@ -8178,13 +8370,13 @@ module.exports = __nccwpck_require__(4219); "use strict"; -var net = __nccwpck_require__(1631); -var tls = __nccwpck_require__(8818); -var http = __nccwpck_require__(8605); -var https = __nccwpck_require__(7211); -var events = __nccwpck_require__(8614); -var assert = __nccwpck_require__(2357); -var util = __nccwpck_require__(1669); +var net = __nccwpck_require__(1808); +var tls = __nccwpck_require__(4404); +var http = __nccwpck_require__(3685); +var https = __nccwpck_require__(5687); +var events = __nccwpck_require__(2361); +var assert = __nccwpck_require__(9491); +var util = __nccwpck_require__(3837); exports.httpOverHttp = httpOverHttp; @@ -8483,7 +8675,7 @@ module.exports = bytesToUuid; // Unique ID creation requires a high quality random # generator. In node.js // this is pretty straight-forward - we use the crypto API. -var crypto = __nccwpck_require__(3373); +var crypto = __nccwpck_require__(6113); module.exports = function nodeRNG() { return crypto.randomBytes(16); @@ -8978,7 +9170,7 @@ try { /***/ }), -/***/ 2357: +/***/ 9491: /***/ ((module) => { "use strict"; @@ -8986,7 +9178,7 @@ module.exports = require("assert"); /***/ }), -/***/ 3129: +/***/ 2081: /***/ ((module) => { "use strict"; @@ -8994,7 +9186,7 @@ module.exports = require("child_process"); /***/ }), -/***/ 3373: +/***/ 6113: /***/ ((module) => { "use strict"; @@ -9002,7 +9194,7 @@ module.exports = require("crypto"); /***/ }), -/***/ 8614: +/***/ 2361: /***/ ((module) => { "use strict"; @@ -9010,7 +9202,7 @@ module.exports = require("events"); /***/ }), -/***/ 5747: +/***/ 7147: /***/ ((module) => { "use strict"; @@ -9018,7 +9210,7 @@ module.exports = require("fs"); /***/ }), -/***/ 8605: +/***/ 3685: /***/ ((module) => { "use strict"; @@ -9026,7 +9218,7 @@ module.exports = require("http"); /***/ }), -/***/ 7211: +/***/ 5687: /***/ ((module) => { "use strict"; @@ -9034,7 +9226,7 @@ module.exports = require("https"); /***/ }), -/***/ 1631: +/***/ 1808: /***/ ((module) => { "use strict"; @@ -9042,7 +9234,7 @@ module.exports = require("net"); /***/ }), -/***/ 2087: +/***/ 2037: /***/ ((module) => { "use strict"; @@ -9050,7 +9242,7 @@ module.exports = require("os"); /***/ }), -/***/ 5622: +/***/ 1017: /***/ ((module) => { "use strict"; @@ -9058,7 +9250,7 @@ module.exports = require("path"); /***/ }), -/***/ 2413: +/***/ 2781: /***/ ((module) => { "use strict"; @@ -9066,7 +9258,7 @@ module.exports = require("stream"); /***/ }), -/***/ 4304: +/***/ 1576: /***/ ((module) => { "use strict"; @@ -9074,7 +9266,7 @@ module.exports = require("string_decoder"); /***/ }), -/***/ 8213: +/***/ 9512: /***/ ((module) => { "use strict"; @@ -9082,7 +9274,7 @@ module.exports = require("timers"); /***/ }), -/***/ 8818: +/***/ 4404: /***/ ((module) => { "use strict"; @@ -9090,7 +9282,7 @@ module.exports = require("tls"); /***/ }), -/***/ 1669: +/***/ 3837: /***/ ((module) => { "use strict"; diff --git a/lib/run.js b/lib/run.js index bf1fd1f..7879dd1 100644 --- a/lib/run.js +++ b/lib/run.js @@ -3,7 +3,11 @@ // Licensed under the MIT license. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -38,7 +42,7 @@ const semver = __importStar(require("semver")); const toolCache = __importStar(require("@actions/tool-cache")); const core = __importStar(require("@actions/core")); const sopsToolName = 'sops'; -const stableSopsVersion = 'v3.5.0'; +const stableSopsVersion = 'v3.7.2'; const sopsAllReleasesUrl = 'https://api.github.com/repos/mozilla/sops/releases'; function getExecutableExtension() { if (os.type().match(/^Win/)) { @@ -49,9 +53,9 @@ function getExecutableExtension() { function getSopsDownloadURL(version) { switch (os.type()) { case 'Linux': - return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.linux', version, version); + return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.linux.amd64', version, version); case 'Darwin': - return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.darwin', version, version); + return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.darwin.amd64', version, version); case 'Windows_NT': default: return util.format('https://github.com/mozilla/sops/releases/download/%s/sops-%s.exe', version, version);