Skip to content

Commit 41a5ba1

Browse files
author
Vlad Volkov
committed
Versions bump. Node16 runtime upgrade
1 parent 759907f commit 41a5ba1

File tree

2 files changed

+80
-58
lines changed

2 files changed

+80
-58
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ branding:
66
color: blue
77
inputs:
88
helm-version:
9-
default: 3.7.2
9+
default: 3.8.0
1010
description: Helm version
1111
required: false
1212
helm:
@@ -63,5 +63,5 @@ inputs:
6363
description: Helm plugins to install
6464
outputs: {}
6565
runs:
66-
using: node12
66+
using: node16
6767
main: src/index.js

src/index.js

Lines changed: 78 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3563,22 +3563,22 @@ var io_1 = __webpack_require__(1);
35633563
var exec_1 = __webpack_require__(986);
35643564
var core_1 = __webpack_require__(470);
35653565
function getBinDir(rootDir) {
3566-
return (0, path_1.join)(rootDir, 'bin');
3566+
return (0, path_1.join)(rootDir, "bin");
35673567
}
35683568
exports.getBinDir = getBinDir;
35693569
function getOsPlatform() {
3570-
return (0, os_1.platform)() === 'win32' ? 'windows' : (0, os_1.platform)().toLowerCase();
3570+
return (0, os_1.platform)() === "win32" ? "windows" : (0, os_1.platform)().toLowerCase();
35713571
}
35723572
exports.getOsPlatform = getOsPlatform;
35733573
function getWorkspaceDir() {
35743574
var _a;
3575-
return (_a = process.env.GITHUB_WORKSPACE) !== null && _a !== void 0 ? _a : (0, path_1.join)(__dirname, '..');
3575+
return (_a = process.env.GITHUB_WORKSPACE) !== null && _a !== void 0 ? _a : (0, path_1.join)(__dirname, "..");
35763576
}
35773577
exports.getWorkspaceDir = getWorkspaceDir;
35783578
function download(url, destination) {
3579-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
3579+
return tslib_1.__awaiter(this, void 0, void 0, function () {
35803580
var downloadPath, destinationDir;
3581-
return (0, tslib_1.__generator)(this, function (_a) {
3581+
return tslib_1.__generator(this, function (_a) {
35823582
switch (_a.label) {
35833583
case 0: return [4, (0, tool_cache_1.downloadTool)(url)];
35843584
case 1:
@@ -3587,8 +3587,8 @@ function download(url, destination) {
35873587
return [4, (0, io_1.mkdirP)(destinationDir)];
35883588
case 2:
35893589
_a.sent();
3590-
if (!(url.endsWith('tar.gz') || url.endsWith('tar') || url.endsWith('tgz'))) return [3, 5];
3591-
return [4, (0, exec_1.exec)('tar', ['-xzf', downloadPath, "--strip=1"])];
3590+
if (!(url.endsWith("tar.gz") || url.endsWith("tar") || url.endsWith("tgz"))) return [3, 5];
3591+
return [4, (0, exec_1.exec)("tar", ["-xzf", downloadPath, "--strip=1"])];
35923592
case 3:
35933593
_a.sent();
35943594
return [4, (0, io_1.mv)((0, path_1.basename)(destination), destinationDir)];
@@ -3599,7 +3599,7 @@ function download(url, destination) {
35993599
case 6:
36003600
_a.sent();
36013601
_a.label = 7;
3602-
case 7: return [4, (0, exec_1.exec)('chmod', ['+x', destination])];
3602+
case 7: return [4, (0, exec_1.exec)("chmod", ["+x", destination])];
36033603
case 8:
36043604
_a.sent();
36053605
(0, core_1.addPath)(destinationDir);
@@ -3880,7 +3880,6 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
38803880
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
38813881
PERFORMANCE OF THIS SOFTWARE.
38823882
***************************************************************************** */
3883-
38843883
/* global global, define, System, Reflect, Promise */
38853884
var __extends;
38863885
var __assign;
@@ -3895,6 +3894,7 @@ var __values;
38953894
var __read;
38963895
var __spread;
38973896
var __spreadArrays;
3897+
var __spreadArray;
38983898
var __await;
38993899
var __asyncGenerator;
39003900
var __asyncDelegator;
@@ -3931,9 +3931,11 @@ var __createBinding;
39313931
(function (exporter) {
39323932
var extendStatics = Object.setPrototypeOf ||
39333933
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3934-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3934+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
39353935

39363936
__extends = function (d, b) {
3937+
if (typeof b !== "function" && b !== null)
3938+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
39373939
extendStatics(d, b);
39383940
function __() { this.constructor = d; }
39393941
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -4012,14 +4014,17 @@ var __createBinding;
40124014
}
40134015
};
40144016

4015-
__createBinding = function(o, m, k, k2) {
4016-
if (k2 === undefined) k2 = k;
4017-
o[k2] = m[k];
4017+
__exportStar = function(m, o) {
4018+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
40184019
};
40194020

4020-
__exportStar = function (m, exports) {
4021-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
4022-
};
4021+
__createBinding = Object.create ? (function(o, m, k, k2) {
4022+
if (k2 === undefined) k2 = k;
4023+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4024+
}) : (function(o, m, k, k2) {
4025+
if (k2 === undefined) k2 = k;
4026+
o[k2] = m[k];
4027+
});
40234028

40244029
__values = function (o) {
40254030
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -4050,12 +4055,14 @@ var __createBinding;
40504055
return ar;
40514056
};
40524057

4058+
/** @deprecated */
40534059
__spread = function () {
40544060
for (var ar = [], i = 0; i < arguments.length; i++)
40554061
ar = ar.concat(__read(arguments[i]));
40564062
return ar;
40574063
};
40584064

4065+
/** @deprecated */
40594066
__spreadArrays = function () {
40604067
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
40614068
for (var r = Array(s), k = 0, i = 0; i < il; i++)
@@ -4064,6 +4071,16 @@ var __createBinding;
40644071
return r;
40654072
};
40664073

4074+
__spreadArray = function (to, from, pack) {
4075+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4076+
if (ar || !(i in from)) {
4077+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
4078+
ar[i] = from[i];
4079+
}
4080+
}
4081+
return to.concat(ar || Array.prototype.slice.call(from));
4082+
};
4083+
40674084
__await = function (v) {
40684085
return this instanceof __await ? (this.v = v, this) : new __await(v);
40694086
};
@@ -4099,31 +4116,35 @@ var __createBinding;
40994116
return cooked;
41004117
};
41014118

4119+
var __setModuleDefault = Object.create ? (function(o, v) {
4120+
Object.defineProperty(o, "default", { enumerable: true, value: v });
4121+
}) : function(o, v) {
4122+
o["default"] = v;
4123+
};
4124+
41024125
__importStar = function (mod) {
41034126
if (mod && mod.__esModule) return mod;
41044127
var result = {};
4105-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
4106-
result["default"] = mod;
4128+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4129+
__setModuleDefault(result, mod);
41074130
return result;
41084131
};
41094132

41104133
__importDefault = function (mod) {
41114134
return (mod && mod.__esModule) ? mod : { "default": mod };
41124135
};
41134136

4114-
__classPrivateFieldGet = function (receiver, privateMap) {
4115-
if (!privateMap.has(receiver)) {
4116-
throw new TypeError("attempted to get private field on non-instance");
4117-
}
4118-
return privateMap.get(receiver);
4137+
__classPrivateFieldGet = function (receiver, state, kind, f) {
4138+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4139+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4140+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
41194141
};
41204142

4121-
__classPrivateFieldSet = function (receiver, privateMap, value) {
4122-
if (!privateMap.has(receiver)) {
4123-
throw new TypeError("attempted to set private field on non-instance");
4124-
}
4125-
privateMap.set(receiver, value);
4126-
return value;
4143+
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
4144+
if (kind === "m") throw new TypeError("Private method is not writable");
4145+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4146+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
4147+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
41274148
};
41284149

41294150
exporter("__extends", __extends);
@@ -4140,6 +4161,7 @@ var __createBinding;
41404161
exporter("__read", __read);
41414162
exporter("__spread", __spread);
41424163
exporter("__spreadArrays", __spreadArrays);
4164+
exporter("__spreadArray", __spreadArray);
41434165
exporter("__await", __await);
41444166
exporter("__asyncGenerator", __asyncGenerator);
41454167
exporter("__asyncDelegator", __asyncDelegator);
@@ -5864,14 +5886,14 @@ var HelmfileArgs;
58645886
})(HelmfileArgs || (HelmfileArgs = {}));
58655887
function getArgsFromInput() {
58665888
return Object.values(HelmfileArgs)
5867-
.filter(function (key) { return (0, core_1.getInput)(key) !== ''; })
5889+
.filter(function (key) { return (0, core_1.getInput)(key) !== ""; })
58685890
.map(function (key) {
58695891
switch (key) {
58705892
case HelmfileArgs.VALUES:
58715893
return [];
58725894
case HelmfileArgs.SELECTORS:
58735895
return (0, core_1.getInput)(HelmfileArgs.SELECTORS)
5874-
.split(',')
5896+
.split(",")
58755897
.map(function (it) { return "--".concat(key, "=").concat(it); });
58765898
default:
58775899
return ["--".concat(key, "=").concat((0, core_1.getInput)(key))];
@@ -5882,82 +5904,82 @@ function getArgsFromInput() {
58825904
}
58835905
var workspaceDir = (0, index_1.getWorkspaceDir)();
58845906
var binDir = (0, index_1.getBinDir)(workspaceDir);
5885-
var cacheDir = (0, path_1.join)(workspaceDir, '.cache');
5886-
var helmCacheDir = (0, path_1.join)(workspaceDir, 'helm');
5907+
var cacheDir = (0, path_1.join)(workspaceDir, ".cache");
5908+
var helmCacheDir = (0, path_1.join)(workspaceDir, "helm");
58875909
var platform = (0, index_1.getOsPlatform)();
58885910
var plugins = new Map()
5889-
.set('diff', new URL('https://github.com/databus23/helm-diff'))
5890-
.set('secrets', new URL('https://github.com/jkroepke/helm-secrets'));
5911+
.set("diff", new URL("https://github.com/databus23/helm-diff"))
5912+
.set("secrets", new URL("https://github.com/jkroepke/helm-secrets"));
58915913
function run() {
5892-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
5914+
return tslib_1.__awaiter(this, void 0, void 0, function () {
58935915
var helmVersion, helmfileVersion, repositoryConfig, helmfileConfig, helmUrl, helmfileUrl, repositoryConfigPath, helmfileConfigPath, pluginUrls, silent, repositoryArgs, inlineValuesArgs, _i, pluginUrls_1, url, globalArgs, _a, _b, error_1;
5894-
return (0, tslib_1.__generator)(this, function (_c) {
5916+
return tslib_1.__generator(this, function (_c) {
58955917
switch (_c.label) {
58965918
case 0:
5897-
helmVersion = (0, core_1.getInput)('helm-version');
5898-
helmfileVersion = (0, core_1.getInput)('helmfile-version');
5899-
repositoryConfig = (0, core_1.getInput)('repository-config');
5900-
helmfileConfig = (0, core_1.getInput)('helmfile-config');
5919+
helmVersion = (0, core_1.getInput)("helm-version");
5920+
helmfileVersion = (0, core_1.getInput)("helmfile-version");
5921+
repositoryConfig = (0, core_1.getInput)("repository-config");
5922+
helmfileConfig = (0, core_1.getInput)("helmfile-config");
59015923
helmUrl = "https://get.helm.sh/helm-v".concat(helmVersion, "-").concat(platform, "-amd64.tar.gz");
59025924
helmfileUrl = "https://github.com/roboll/helmfile/releases/download/v".concat(helmfileVersion, "/helmfile_").concat(platform, "_amd64");
59035925
repositoryConfigPath = (0, path_1.join)(workspaceDir, repositoryConfig);
59045926
helmfileConfigPath = (0, path_1.join)(workspaceDir, helmfileConfig);
5905-
pluginUrls = (0, core_1.getInput)('plugins')
5906-
.split(',')
5927+
pluginUrls = (0, core_1.getInput)("plugins")
5928+
.split(",")
59075929
.filter(function (name) { return plugins.has(name); })
59085930
.map(function (name) { return plugins.get(name); });
5909-
silent = Boolean((0, core_1.getInput)('quiet'));
5931+
silent = Boolean((0, core_1.getInput)("quiet"));
59105932
_c.label = 1;
59115933
case 1:
59125934
_c.trys.push([1, 17, , 18]);
5913-
(0, core_1.exportVariable)('XDG_CACHE_HOME', cacheDir);
5935+
(0, core_1.exportVariable)("XDG_CACHE_HOME", cacheDir);
59145936
return [4, (0, io_util_1.exists)(repositoryConfigPath)];
59155937
case 2:
5916-
repositoryArgs = (_c.sent()) ? ['--repository-config', repositoryConfigPath] : [];
5938+
repositoryArgs = (_c.sent()) ? ["--repository-config", repositoryConfigPath] : [];
59175939
inlineValuesArgs = (0, core_1.getInput)(HelmfileArgs.VALUES)
5918-
.split('\n')
5940+
.split("\n")
59195941
.map(function (it) { return it.trim(); })
59205942
.filter(Boolean)
59215943
.map(function (kv) { return "--set=".concat(kv); });
59225944
return [4, (0, io_1.mkdirP)(helmCacheDir)];
59235945
case 3:
59245946
_c.sent();
5925-
return [4, (0, index_1.download)(helmUrl, (0, path_1.join)(binDir, 'helm'))];
5947+
return [4, (0, index_1.download)(helmUrl, (0, path_1.join)(binDir, "helm"))];
59265948
case 4:
59275949
_c.sent();
59285950
_i = 0, pluginUrls_1 = pluginUrls;
59295951
_c.label = 5;
59305952
case 5:
59315953
if (!(_i < pluginUrls_1.length)) return [3, 8];
59325954
url = pluginUrls_1[_i];
5933-
return [4, (0, exec_1.exec)('helm', ['plugin', 'install', url.toString()], { silent: silent })["catch"](core_1.warning)];
5955+
return [4, (0, exec_1.exec)("helm", ["plugin", "install", url.toString()], { silent: silent })["catch"](core_1.warning)];
59345956
case 6:
59355957
_c.sent();
59365958
_c.label = 7;
59375959
case 7:
59385960
_i++;
59395961
return [3, 5];
5940-
case 8: return [4, (0, index_1.download)(helmfileUrl, (0, path_1.join)(binDir, 'helmfile'))];
5962+
case 8: return [4, (0, index_1.download)(helmfileUrl, (0, path_1.join)(binDir, "helmfile"))];
59415963
case 9:
59425964
_c.sent();
59435965
if (!(repositoryArgs.length > 0)) return [3, 11];
5944-
return [4, (0, exec_1.exec)('helm', ['repo', 'update'].concat(repositoryArgs), { silent: silent })];
5966+
return [4, (0, exec_1.exec)("helm", ["repo", "update"].concat(repositoryArgs), { silent: silent })];
59455967
case 10:
59465968
_c.sent();
59475969
_c.label = 11;
59485970
case 11:
5949-
if (!((0, core_1.getInput)('helmfile') !== '')) return [3, 14];
5971+
if (!((0, core_1.getInput)("helmfile") !== "")) return [3, 14];
59505972
_b = (_a = getArgsFromInput()).concat;
59515973
return [4, (0, io_util_1.exists)(helmfileConfigPath)];
59525974
case 12:
5953-
globalArgs = _b.apply(_a, [(_c.sent()) ? ['--file', helmfileConfigPath] : []]);
5954-
return [4, (0, exec_1.exec)('helmfile', globalArgs.concat((0, core_1.getInput)('helmfile').split(' ').concat(inlineValuesArgs)))];
5975+
globalArgs = _b.apply(_a, [(_c.sent()) ? ["--file", helmfileConfigPath] : []]);
5976+
return [4, (0, exec_1.exec)("helmfile", globalArgs.concat((0, core_1.getInput)("helmfile").split(" ").concat(inlineValuesArgs)))];
59555977
case 13:
59565978
_c.sent();
59575979
return [3, 16];
59585980
case 14:
5959-
if (!((0, core_1.getInput)('helm') !== '')) return [3, 16];
5960-
return [4, (0, exec_1.exec)('helm', (0, core_1.getInput)('helm').split(' ').concat(repositoryArgs).concat(inlineValuesArgs))];
5981+
if (!((0, core_1.getInput)("helm") !== "")) return [3, 16];
5982+
return [4, (0, exec_1.exec)("helm", (0, core_1.getInput)("helm").split(" ").concat(repositoryArgs).concat(inlineValuesArgs))];
59615983
case 15:
59625984
_c.sent();
59635985
_c.label = 16;

0 commit comments

Comments
 (0)