Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove config-map parser #913

Merged
merged 5 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## HEAD (Unreleased)

**(none)**
- fix: remove config-map parser

--

Expand Down
16 changes: 5 additions & 11 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ConfigMap } from '@pulumi/pulumi/automation';
import {
getBooleanInput,
getInput,
Expand Down Expand Up @@ -27,14 +28,6 @@ export function makeInstallationConfig(): rt.Result<InstallationConfig> {
});
}

const configValueRt = rt.Dictionary(
rt.Record({
value: rt.String,
secret: rt.Boolean.optional(),
}),
rt.String,
);

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function makeConfig() {
return {
Expand All @@ -53,9 +46,10 @@ export function makeConfig() {
upsert: getBooleanInput('upsert'),
remove: getBooleanInput('remove'),
refresh: getBooleanInput('refresh'),
configMap: getYAMLInput('config-map', {
parser: (configMap) => configValueRt.check(configMap),
}),
// TODO: Add parser back once pulumi/pulumi#12641 is fixed.
// @see https://github.com/pulumi/actions/pull/913
// @see https://github.com/pulumi/actions/pull/912
configMap: getYAMLInput<ConfigMap>('config-map'),
editCommentOnPr: getBooleanInput('edit-pr-comment'),

options: {
Expand Down