db54a43a91
@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>
29 lines
393 B
CUE
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
|
|
}
|