From 20398c829762947299d2d4a625704291a49ed87c Mon Sep 17 00:00:00 2001 From: LiamAttClarke Date: Mon, 21 Sep 2020 17:12:48 -0400 Subject: [PATCH] Added debug option --- README.md | 1 + action.yml | 9 +++++++-- index.js | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 854f1015..956b690d 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ payload if the action was triggered by a deployment. - `task`: Task name. If the task is "remove" it will remove the configured helm release. - `dry-run`: Helm dry-run option. +- `debug`: Helm debug option. - `token`: Github repository token. If included and the event is a deployment then the deployment_status event will be fired. - `value-files`: Additional value files to apply to the helm chart. Expects a diff --git a/action.yml b/action.yml index 08f6242a..3e6a2576 100644 --- a/action.yml +++ b/action.yml @@ -17,9 +17,14 @@ inputs: values: description: Helm chart values, expected to be a YAML or JSON string. required: false + task: + description: Task name. If the task is "remove" it will remove the configured helm release. + required: false dry-run: - description: Task name. If the task is "remove" it will remove the configured - helm release. + description: Helm dry-run option + required: false + debug: + description: Helm debug option required: false helm: description: Helm binary to execute, one of [helm, helm3]. diff --git a/index.js b/index.js index 498334b3..7cf4de78 100644 --- a/index.js +++ b/index.js @@ -168,6 +168,7 @@ async function run() { const timeout = getInput("timeout"); const repository = getInput("repository"); const dryRun = core.getInput("dry-run"); + const debug = core.getInput("debug"); const secrets = getSecrets(core.getInput("secrets")); core.debug(`param: track = "${track}"`); @@ -178,6 +179,7 @@ async function run() { core.debug(`param: chart_version = "${chartVersion}"`); core.debug(`param: values = "${values}"`); core.debug(`param: dryRun = "${dryRun}"`); + core.debug(`param: debug = "${debug}"`); core.debug(`param: task = "${task}"`); core.debug(`param: version = "${version}"`); core.debug(`param: secrets = "${JSON.stringify(secrets)}"`); @@ -208,6 +210,7 @@ async function run() { } if (dryRun) args.push("--dry-run"); + if (debug) args.push("--debug"); if (appName) args.push(`--set=app.name=${appName}`); if (version) args.push(`--set=app.version=${version}`); if (chartVersion) args.push(`--version=${chartVersion}`);