with buildpath

This commit is contained in:
2022-10-29 23:25:31 +02:00
parent e9dd36f1e4
commit f89936200e
3 changed files with 30 additions and 11 deletions

27
example/main.go Normal file
View File

@@ -0,0 +1,27 @@
package main
import (
"context"
"log"
"git.front.kjuulh.io/kjuulh/dagger-go/internal"
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/tasks"
)
func main() {
ctx := context.Background()
if err := run(ctx); err != nil {
log.Fatal(err)
}
}
func run(ctx context.Context) error {
builder, err := internal.New(ctx)
if err != nil {
return err
}
defer builder.CleanUp()
return tasks.Build(builder, "some-image")
}