Skip to content

Commit

Permalink
fix: Parse values if an object
Browse files Browse the repository at this point in the history
  • Loading branch information
colinjfw committed Aug 31, 2019
1 parent e624622 commit 76181ec
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ function chartName(name) {
return name
}

function getValues(values) {
if (!values) {
return "{}"
}
if (typeof values === "object") {
return JSON.stringify(values)
}
return values
}

function getInput(name, options) {
const context = github.context;
const deployment = context.payload.deployment;
Expand All @@ -79,7 +89,7 @@ async function run() {
const release = releaseName(getInput("release", required), track);
const namespace = getInput("namespace", required);
const chart = chartName(getInput("chart", required));
const values = getInput("values") || "{}";
const values = getValues(getInput("values"));
const dryRun = getInput("dry-run");
const task = getInput("task");
const version = getInput("version");
Expand Down

0 comments on commit 76181ec

Please sign in to comment.