Merge pull request #1817 from gerhard/add-helloworld-example

Add helloworld example
This commit is contained in:
Gerhard Lazu 2022-03-29 00:45:30 +01:00 committed by GitHub
commit 04e703e542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,24 @@
// dagger do hello --log-format=plain
//
// 9:06AM INF actions._alpine | computing
// 9:06AM INF actions._alpine | completed duration=1s
// 9:06AM INF actions.hello | computing
// 9:06AM INF actions.hello | #3 0.073 hello, world!
// 9:06AM INF actions.hello | completed duration=100ms
package main
import (
"dagger.io/dagger"
)
dagger.#Plan & {
actions: {
_alpine: dagger.#Pull & {source: "alpine:3"}
// Hello world
hello: dagger.#Exec & {
input: _alpine.output
args: ["echo", "hello, world!"]
always: true
}
}
}