Skip to content

Commit b228e22

Browse files
author
Vlad Volkov
committed
Helmfile use values now
1 parent 3bb59c8 commit b228e22

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
with:
4040
helmfile: apply
4141
helmfile-config: test/helmfile.yaml
42+
values: |
43+
serviceAccount.create=false
44+
image.repository=library/nginx
4245
4346
- name: Get ingresses
4447
run: kubectl get ingress

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ inputs:
1313
default: ''
1414
description: Helm command arguments
1515
required: false
16+
values:
17+
default: ''
18+
description: Values in multiline string defined as key=value
19+
required: false
1620
quiet:
1721
default: 'true'
1822
description: Disabled output on plugin installation & download actions

src/index.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5854,6 +5854,7 @@ var io_util_1 = __webpack_require__(672);
58545854
var path_1 = __webpack_require__(622);
58555855
var HelmfileArgs;
58565856
(function (HelmfileArgs) {
5857+
HelmfileArgs["VALUES"] = "values";
58575858
HelmfileArgs["SELECTORS"] = "selector";
58585859
HelmfileArgs["ENVIRONMENT"] = "environment";
58595860
HelmfileArgs["NAMESPACE"] = "namespace";
@@ -5865,11 +5866,16 @@ function getArgsFromInput() {
58655866
return Object.values(HelmfileArgs)
58665867
.filter(function (key) { return (0, core_1.getInput)(key) !== ''; })
58675868
.map(function (key) {
5868-
return key === HelmfileArgs.SELECTORS
5869-
? (0, core_1.getInput)(HelmfileArgs.SELECTORS)
5870-
.split(',')
5871-
.map(function (it) { return "--".concat(key, "=").concat(it); })
5872-
: ["--".concat(key, "=").concat((0, core_1.getInput)(key))];
5869+
switch (key) {
5870+
case HelmfileArgs.VALUES:
5871+
return ["--state-values-set=".concat((0, core_1.getInput)(HelmfileArgs.VALUES).split('\n').filter(Boolean).join(','))];
5872+
case HelmfileArgs.SELECTORS:
5873+
return (0, core_1.getInput)(HelmfileArgs.SELECTORS)
5874+
.split(',')
5875+
.map(function (it) { return "--".concat(key, "=").concat(it); });
5876+
default:
5877+
return ["--".concat(key, "=").concat((0, core_1.getInput)(key))];
5878+
}
58735879
})
58745880
.flat(1);
58755881
}

0 commit comments

Comments
 (0)