Created
April 29, 2022 09:06
-
-
Save dolanor/5426c406bdff4276c3523ce9c19d3268 to your computer and use it in GitHub Desktop.
Inject values in a dagger do run
This file contains hidden or 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 main | |
import ( | |
"dagger.io/dagger" | |
"universe.dagger.io/bash" | |
"universe.dagger.io/docker" | |
) | |
dagger.#Plan & { | |
actions: { | |
params: { | |
myval: string | |
} | |
_pull: docker.#Pull & { | |
source: "index.docker.io/debian" | |
} | |
_image: _pull.output | |
exec: bash.#Run & { | |
input: _image | |
script: contents: """ | |
echo \(params.myval) | |
echo done | |
""" | |
} | |
} | |
} |
This file contains hidden or 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
dagger do exec --with 'actions: params: myval: "Hello World"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment