2022-10-29 23:25:31 +02:00
|
|
|
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()
|
|
|
|
|
2022-10-29 23:33:46 +02:00
|
|
|
return tasks.Build(builder, "some-image", "example/main.go")
|
2022-10-29 23:25:31 +02:00
|
|
|
}
|