diff --git a/core/src/actions/build.ts b/core/src/actions/build.ts index 300e68afec..dc4ffd9e7c 100644 --- a/core/src/actions/build.ts +++ b/core/src/actions/build.ts @@ -70,7 +70,10 @@ export const copyFromSchema = createSchema({ .description( "POSIX-style path or filename of the directory or file(s) to copy to the target, relative to the build path of the source build." ), - targetPath: joi.posixPath().subPathOnly().default("").description(dedent` + targetPath: joi + .posixPath() + .subPathOnly() + .default((parent) => parent.sourcePath).description(dedent` POSIX-style path or filename to copy the directory or file(s), relative to the build directory. Defaults to to same as source path. `), diff --git a/docs/reference/action-types/Build/container.md b/docs/reference/action-types/Build/container.md index ed38b641d0..fb113925c4 100644 --- a/docs/reference/action-types/Build/container.md +++ b/docs/reference/action-types/Build/container.md @@ -146,7 +146,7 @@ copyFrom: # POSIX-style path or filename to copy the directory or file(s), relative to the build directory. # Defaults to to same as source path. - targetPath: '' + targetPath: # Specify a list of POSIX-style paths or globs that should be included as the build context for the Build, and will # affect the computed _version_ of the action. @@ -422,9 +422,9 @@ POSIX-style path or filename of the directory or file(s) to copy to the target, POSIX-style path or filename to copy the directory or file(s), relative to the build directory. Defaults to to same as source path. -| Type | Default | Required | -| ----------- | ------- | -------- | -| `posixPath` | `""` | No | +| Type | Required | +| ----------- | -------- | +| `posixPath` | No | ### `include[]` diff --git a/docs/reference/action-types/Build/exec.md b/docs/reference/action-types/Build/exec.md index 0fde293d52..2d69c802ed 100644 --- a/docs/reference/action-types/Build/exec.md +++ b/docs/reference/action-types/Build/exec.md @@ -146,7 +146,7 @@ copyFrom: # POSIX-style path or filename to copy the directory or file(s), relative to the build directory. # Defaults to to same as source path. - targetPath: '' + targetPath: # Specify a list of POSIX-style paths or globs that should be included as the build context for the Build, and will # affect the computed _version_ of the action. @@ -426,9 +426,9 @@ POSIX-style path or filename of the directory or file(s) to copy to the target, POSIX-style path or filename to copy the directory or file(s), relative to the build directory. Defaults to to same as source path. -| Type | Default | Required | -| ----------- | ------- | -------- | -| `posixPath` | `""` | No | +| Type | Required | +| ----------- | -------- | +| `posixPath` | No | ### `include[]` diff --git a/docs/reference/action-types/Build/jib-container.md b/docs/reference/action-types/Build/jib-container.md index aea46e1b2b..23b7d1a58f 100644 --- a/docs/reference/action-types/Build/jib-container.md +++ b/docs/reference/action-types/Build/jib-container.md @@ -158,7 +158,7 @@ copyFrom: # POSIX-style path or filename to copy the directory or file(s), relative to the build directory. # Defaults to to same as source path. - targetPath: '' + targetPath: # Specify a list of POSIX-style paths or globs that should be included as the build context for the Build, and will # affect the computed _version_ of the action. @@ -496,9 +496,9 @@ POSIX-style path or filename of the directory or file(s) to copy to the target, POSIX-style path or filename to copy the directory or file(s), relative to the build directory. Defaults to to same as source path. -| Type | Default | Required | -| ----------- | ------- | -------- | -| `posixPath` | `""` | No | +| Type | Required | +| ----------- | -------- | +| `posixPath` | No | ### `include[]`