Skip to content

Commit

Permalink
Put the new behavior behind the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Feb 14, 2024
1 parent 240f2ac commit 246a10d
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 11 deletions.
3 changes: 3 additions & 0 deletions check-terraform-skip/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions export-aws-secrets-manager/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions get-global-config/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ outputs:
enable_trivy:
description: If true, trivy is enabled in test action

disable_update_local_path_module_caller:
description: If true, local-path module caller is updated when any of local-path modules is updated

aqua_update_checksum_enabled:
description: If true, aqua-checksums.json on working directories is updated
aqua_update_checksum_skip_push:
Expand Down
20 changes: 12 additions & 8 deletions get-global-config/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions get-global-config/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface Outputs {
drift_issue_repo_owner: string;
drift_issue_repo_name: string;
disable_update_related_pull_requests: boolean;
disable_update_local_path_module_caller: boolean;
aqua_update_checksum_enabled: boolean;
aqua_update_checksum_prune: boolean;
aqua_update_checksum_skip_push: boolean;
Expand Down Expand Up @@ -64,6 +65,9 @@ export const main = (config: lib.Config, input: Input): Result => {
disable_update_related_pull_requests: !(
config?.update_related_pull_requests?.enabled ?? true
),
disable_update_local_path_module_caller: !(
config?.update_local_path_module_caller?.enabled ?? false
),
aqua_update_checksum_enabled:
config?.aqua?.update_checksum?.enabled ?? false,
aqua_update_checksum_prune: config?.aqua?.update_checksum?.prune ?? false,
Expand Down
3 changes: 3 additions & 0 deletions get-target-config/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions lib/dist/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ const Config = z.object({
tflint: z.optional(TflintConfig),
tfsec: z.optional(TfsecConfig),
trivy: z.optional(TrivyConfig),
update_local_path_module_caller: z.optional(
z.object({
enabled: z.optional(z.boolean()),
}),
),
update_related_pull_requests: z.optional(
z.object({
enabled: z.optional(z.boolean()),
Expand Down
5 changes: 4 additions & 1 deletion list-targets-with-changed-files/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion list-targets-with-changed-files/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const run = (input: Input): TargetConfig[] => {
}
}

const moduleCallerMap = JSON.parse(core.getInput("module_callers"));
const moduleCallerMap = JSON.parse(core.getInput("module_callers") || "{}");
const changedWorkingDirs = new Set<string>();
for (let i = 0; i < changedFiles.length; i++) {
const changedFile = changedFiles[i];
Expand Down
5 changes: 4 additions & 1 deletion list-targets/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ runs:
shell: bash
- uses: suzuki-shunsuke/tfaction/list-working-dirs@main
id: list-working-directory-configs
- uses: suzuki-shunsuke/list-module-callers@main
- uses: suzuki-shunsuke/tfaction/get-global-config@main
id: global-config
- uses: suzuki-shunsuke/tfaction/list-module-callers@main
id: list-module-callers
if: steps.global-config.outputs.disable_update_local_path_module_caller == 'false'
with:
config_files: ${{ steps.list-working-directory-configs.outputs.file }}
module_files: ${{ steps.list-working-directory-configs.outputs.module_file }}
Expand Down

0 comments on commit 246a10d

Please sign in to comment.