CI: move grafana-build into pkg/build (#105640)

* move grafana-build into pkg/build
This commit is contained in:
Kevin Minehart
2025-05-20 10:48:00 -05:00
committed by GitHub
parent 759933d3e2
commit 13f4cf162e
222 changed files with 17387 additions and 442 deletions
@@ -0,0 +1,22 @@
package daggerutil
import (
"errors"
"os"
"dagger.io/dagger"
)
// HostDir checks that the directory at 'path' exists and returns the dagger.Directory at 'path'.
func HostDir(d *dagger.Client, path string) (*dagger.Directory, error) {
info, err := os.Stat(path)
if err != nil {
return nil, err
}
if !info.IsDir() {
return nil, errors.New("given hostdir is not a directory")
}
return d.Host().Directory(path), nil
}