CI: Build pre-release artifacts in GhA on merge to release branches and main. (#106779)

* Add grafana-build action and workflow

* Fix the --verify flag stalling on tar.gz builds

* Add event sources for main / release branches

* Update CODEOWNERS
This commit is contained in:
Kevin Minehart
2025-06-16 22:54:50 +02:00
committed by GitHub
parent 09e8484bac
commit 8b370bb6a5
30 changed files with 351 additions and 2399 deletions
+6 -6
View File
@@ -93,15 +93,15 @@ func GolangContainer(
container := golang.Container(d, platform, goVersion).
WithExec([]string{"apk", "add", "--update", "wget", "build-base", "alpine-sdk", "musl", "musl-dev", "xz"}).
WithExec([]string{"wget", "https://dl.grafana.com/ci/zig-linux-x86_64-0.11.0.tar.xz"}).
WithExec([]string{"wget", "-q", "https://dl.grafana.com/ci/zig-linux-x86_64-0.11.0.tar.xz"}).
WithExec([]string{"tar", "--strip-components=1", "-C", "/", "-xf", "zig-linux-x86_64-0.11.0.tar.xz"}).
WithExec([]string{"mv", "/zig", "/bin/zig"}).
// Install the toolchain specifically for armv7 until we figure out why it's crashing w/ zig container = container.
WithExec([]string{"mkdir", "/toolchain"}).
WithExec([]string{"wget", "http://dl.grafana.com/ci/arm-linux-musleabihf-cross.tgz", "-P", "/toolchain"}).
WithExec([]string{"tar", "-xvf", "/toolchain/arm-linux-musleabihf-cross.tgz", "-C", "/toolchain"}).
WithExec([]string{"wget", "https://dl.grafana.com/ci/s390x-linux-musl-cross.tgz", "-P", "/toolchain"}).
WithExec([]string{"tar", "-xvf", "/toolchain/s390x-linux-musl-cross.tgz", "-C", "/toolchain"})
WithExec([]string{"wget", "-q", "http://dl.grafana.com/ci/arm-linux-musleabihf-cross.tgz", "-P", "/toolchain"}).
WithExec([]string{"tar", "-xf", "/toolchain/arm-linux-musleabihf-cross.tgz", "-C", "/toolchain"}).
WithExec([]string{"wget", "-q", "https://dl.grafana.com/ci/s390x-linux-musl-cross.tgz", "-P", "/toolchain"}).
WithExec([]string{"tar", "-xf", "/toolchain/s390x-linux-musl-cross.tgz", "-C", "/toolchain"})
return WithGoEnv(log, container, distro, opts)
}
@@ -160,7 +160,7 @@ func Builder(
WithDirectory("/src/", src, dagger.ContainerWithDirectoryOpts{
Include: []string{"**/*.mod", "**/*.sum", "**/*.work", ".git"},
}).
WithDirectory("/src/pkg", src.Directory("pkg")).
WithDirectory("/src/pkg", src.WithoutDirectory("pkg/build").Directory("pkg")).
WithDirectory("/src/apps", src.Directory("apps")).
WithDirectory("/src/emails", src.Directory("emails")).
WithFile("/src/pkg/server/wire_gen.go", Wire(d, src, platform, goVersion, opts.WireTag)).