{do:"subdir"} to select a subdirectory in a script

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-02-04 19:38:05 +00:00
parent 0202f4447b
commit 622de21883
5 changed files with 68 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
package main
hello: {
string
#dagger: compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
args: ["mkdir", "-p", "/tmp/foo"]
},
{
do: "exec"
args: ["sh", "-c", "echo -n world > /tmp/foo/hello"]
},
{
do: "subdir"
dir: "/tmp/foo"
},
{
do: "export"
source: "/hello"
format: "string"
},
]
}