feat(publish): example publishing to some remote registry
This commit is contained in:
parent
3c8e872e6e
commit
e74b8cc185
2 changed files with 40 additions and 1 deletions
|
|
@ -59,6 +59,20 @@ class HelloDagger {
|
|||
.withExec(["golangci-lint", "run", "-v"]);
|
||||
}
|
||||
|
||||
@func()
|
||||
async publish(source: Directory, target?: string): Promise<string> {
|
||||
// publish can only push to external registries
|
||||
// to publish to your local docker, you have to export the tarball and use `docker load`
|
||||
|
||||
// This example is somewhat useless as one could just chain `publish` to `call build`
|
||||
|
||||
// publish automatically picks up the local auth from the host
|
||||
// otherwise, use `withRegistryAuth()`
|
||||
return this.build(source).publish(
|
||||
target ?? "mtr.devops.telekom.de/patrick_sy/hello-dagger:latest",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a ready-to-use development environment
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue