Skip to content

Commit

Permalink
feat: Add dry-run option to inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
colinjfw committed Aug 23, 2019
1 parent e6122dd commit 988fedd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ inputs:
description: 'Helm chart path'
values:
description: 'Helm chart values, expected to be a YAML or JSON string'
dry-run:
description: 'Helm dry-run option'
token:
description: >
Github repository token. If included and the event is a deployment then
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async function run() {
const namespace = core.getInput("namespace", required);
const chart = core.getInput("chart", required);
const values = core.getInput("values") || "{}";
const dryRun = core.getInput("dry-run");

// Load in the github context and deployment event.
const context = github.context;
Expand All @@ -63,6 +64,7 @@ async function run() {
"--namespace", namespace,
"--values", "./values.yml",
];
if (dryRun) args.push("--dry-run");

// Setup necessary files.
if (process.env.KUBECONFIG_FILE) {
Expand Down

0 comments on commit 988fedd

Please sign in to comment.