Last active
April 12, 2022 11:53
-
-
Save brk3/efce0598dbe20aced222419d27c54dcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import ( | |
"dagger.io/dagger" | |
"dagger.io/dagger/core" | |
"universe.dagger.io/docker" | |
) | |
dagger.#Plan & { | |
actions: { | |
rover: { | |
alpine: docker.#Pull & {source: "alpine:3"} | |
foocache: "/foo": { | |
dest: "/foo" | |
type: "cache" | |
contents: core.#CacheDir & { | |
id: "foo" | |
} | |
} | |
writecache: docker.#Run & { | |
input: alpine.image | |
user: "root" | |
command: name: "echo" | |
command: args: [ "hello!", ">", "/foo/hello.txt" ] | |
always: true | |
mounts: foocache | |
} | |
readcache: docker.#Run & { | |
input: alpine.image | |
user: "root" | |
command: name: "cat" | |
command: args: [ "/foo/hello.txt" ] | |
always: true | |
env: DEP: "\(writecache.success)" | |
mounts: foocache | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment