Skip to content

Commit

Permalink
fix: Include debug logs about vars
Browse files Browse the repository at this point in the history
  • Loading branch information
colinjfw committed Aug 31, 2019
1 parent 4d83f1e commit 4ad9022
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ function chartName(name) {
function getInput(name, options) {
const context = github.context;
const deployment = context.payload.deployment;
const val = core.getInput(name, { ...options, required: false })
let val = core.getInput(name, { ...options, required: false })
if (deployment) {
if (deployment[name]) return deployment[name];
if (deployment.payload[name]) return deployment.payload[name];
if (deployment[name]) val = deployment[name];
if (deployment.payload[name]) val = deployment.payload[name];
}
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
}
core.debug(`param: ${name} = "${val.replace('\n', ' ')}"`)
return val
}

Expand Down Expand Up @@ -110,8 +111,6 @@ async function run() {
}
await writeFile("./values.yml", values);

await exec.exec("cat", "./values.yml")

// Actually execute the deployment here.
if (task === "remove") {
await exec.exec("helm", ["delete", release, "--purge"], opts);
Expand Down

0 comments on commit 4ad9022

Please # to comment.