Skip to content

Commit 525c89c

Browse files
improvement: default to include:[] for container Deploy/Test/Run actions (#7717)
Co-authored-by: Jon Edvald <edvald@gmail.com>
1 parent 60beac7 commit 525c89c

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

core/src/plugins/container/container.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,11 @@ export const gardenPlugin = () =>
586586
)
587587
}
588588

589+
if (config.include === undefined && config.exclude === undefined) {
590+
// No reason to include files by default since the spec.image field is required and is enough to version the action
591+
config.include = []
592+
}
593+
589594
return { config, supportedModes: { sync: !!spec.sync } satisfies ActionModes }
590595
},
591596

@@ -655,7 +660,14 @@ export const gardenPlugin = () =>
655660
schema: containerRunActionSchema(),
656661
runtimeOutputsSchema: containerRunOutputSchema(),
657662
handlers: {
658-
// Implemented by other providers (e.g. kubernetes)
663+
async configure({ config }) {
664+
if (config.include === undefined && config.exclude === undefined) {
665+
// No reason to include files by default since the spec.image field is required and is enough to version the action
666+
config.include = []
667+
}
668+
return { config, supportedModes: { sync: false } satisfies ActionModes }
669+
},
670+
659671
async validate({ action }) {
660672
validateRuntimeCommon(action)
661673
return {}
@@ -674,6 +686,14 @@ export const gardenPlugin = () =>
674686
schema: containerTestActionSchema(),
675687
runtimeOutputsSchema: containerTestOutputSchema(),
676688
handlers: {
689+
async configure({ config }) {
690+
if (config.include === undefined && config.exclude === undefined) {
691+
// No reason to include files by default since the spec.image field is required and is enough to version the action
692+
config.include = []
693+
}
694+
return { config, supportedModes: { sync: false } satisfies ActionModes }
695+
},
696+
677697
// Implemented by other providers (e.g. kubernetes)
678698
async validate({ action }) {
679699
validateRuntimeCommon(action)

0 commit comments

Comments
 (0)