Skip to content

Instantly share code, notes, and snippets.

@levlaz
Last active October 8, 2024 17:57
Show Gist options
  • Save levlaz/7bf5a8e66fcd68a0241d18f20e011c49 to your computer and use it in GitHub Desktop.
Save levlaz/7bf5a8e66fcd68a0241d18f20e011c49 to your computer and use it in GitHub Desktop.
Testing wtih dagger/dagger
@function
async def text_examples(self, source: dagger.Directory) -> str:
output = ""
for language in ["python", "typescript", "go", "shell"]:
output += await (
dag.
dagger_dev().
dev().
with_mounted_directory("/src", source).
with_workdir("/src").
with_exec(["bash", "-c", f"dagger call -m examples/{language} bluesky-post"]).
stdout()
)
return output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment