This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/pkg/dagger.io/dagger/utils.cue
guillaume db54a43a91 Port #Subdir to hidden fields
@jlongtine just implemented the possibility to use hidden fields.
This PR uses this new implementation

Pair: @jlongtine

Signed-off-by: guillaume <guillaume.derouville@gmail.com>
2022-01-13 00:42:22 +01:00

29 lines
393 B
CUE

package dagger
import (
"dagger.io/dagger/engine"
)
// Select a subdirectory from a filesystem tree
#Subdir: {
// Input tree
input: #FS
// Path of the subdirectory
// Example: "/build"
path: string
// Copy action
_copy: engine.#Copy & {
"input": engine.#Scratch
source: {
root: input
"path": path
}
dest: "/"
}
// Subdirectory tree
output: #FS & _copy.output
}