Skip to content

Commit

Permalink
Allow suppressing progress dots and outputs (#1116)
Browse files Browse the repository at this point in the history
* add suppress outputs and suppress progress options support, update readme, require recent changes from pulumi automation

* correct pulumi/pulumi dependency version

* update test cases

* update changelog

* also update action definition
  • Loading branch information
mikocot authored Mar 21, 2024
1 parent ae8c562 commit fcac4d5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## HEAD (Unreleased)

- feat: support disabling progress dots and outputs printing
(--suppress-progress, --suppress-outputs)
([#116](https://github.com/pulumi/actions/pull/1116))

---

## 5.1.1 (2024-01-24)
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ The action can be configured with the following arguments:
(1 for no parallelism). Defaults to unbounded.

- `policyPacks` - (optional) Run one or more policy packs with the provided
`command`. Multiple values can be specified one per line (example: `<value | string>,...`).
`command`. Multiple values can be specified one per line (example:
`<value | string>,...`).

- `policyPackConfigs` - (optional) Path(s) to JSON file(s) containing the config
for the policy pack with the corresponding "policy-pack" argument. Multiple
Expand Down Expand Up @@ -129,6 +130,12 @@ The action can be configured with the following arguments:
- `exclude-protected` - (optional) Skip destroying protected resources. Only
valid when `command` is `destroy`.

- `suppress-outputs` - (optional) Suppress display of stack outputs (in case
they contain sensitive values).

- `suppress-progress` - (optional) Suppress display of periodic progress dots to
limit logs length.

- `plan` - (optional) Used for
[update plans](https://www.pulumi.com/docs/concepts/update-plans/)
- On `preview`: Where to save the update plan. If you choose to use this in a
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ inputs:
plan:
description: 'Where to either save an Update Plan or read an Update Plan from'
required: false
suppress-outputs:
description: 'Suppress display of stack outputs (in case they contain sensitive values).'
required: false
default: 'false'
suppress-progress:
description: 'Suppress display of periodic progress dots to limit logs length'
required: false
default: 'false'
outputs:
output:
description: Output from running command
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@actions/github": "^5.1.1",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@pulumi/pulumi": "3.77.1",
"@pulumi/pulumi": "3.109.0",
"actions-parsers": "^1.0.2",
"dedent": "^0.7.0",
"envalid": "^7.3.1",
Expand Down
6 changes: 5 additions & 1 deletion src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const defaultConfig: Record<string, string> = {
diff: 'false',
'target-dependents': 'false',
'exclude-protected': 'false',
'plan': '',
plan: '',
'suppress-outputs': 'false',
'suppress-progress': 'false',
};

function setupMockedConfig(config: Record<string, string>) {
Expand Down Expand Up @@ -56,6 +58,8 @@ describe('config.ts', () => {
"policyPackConfigs": Array [],
"policyPacks": Array [],
"replace": Array [],
"suppressOutputs": false,
"suppressProgress": false,
"target": Array [],
"targetDependents": false,
"userAgent": "pulumi/actions@v5",
Expand Down
2 changes: 2 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export function makeConfig() {
}),
excludeProtected: getBooleanInput('exclude-protected'),
plan: getInput('plan'),
suppressOutputs: getBooleanInput('suppress-outputs'),
suppressProgress: getBooleanInput('suppress-progress'),
},
};
}
Expand Down

0 comments on commit fcac4d5

Please sign in to comment.