Unify container build workflows (#306)
All checks were successful
Build Container / detect (push) Successful in 3s
All checks were successful
Build Container / detect (push) Successful in 3s
## Summary - Merges `build-container.yaml` and `build-container-nix.yaml` into a single workflow - Detect job classifies each changed container by presence of `Dockerfile` and/or `default.nix` - Dockerfile containers build on `k8s` (indri) via Dagger; Nix containers build on `nix-container-builder` (ringtail) via nix-build + skopeo - Containers with both build files (alloy, nettest, ntfy) get built on both runners ## Test plan - [ ] Push a change to a Dockerfile-only container (e.g. grafana) — verify it builds on k8s only - [ ] Push a change to a nix-only container (e.g. jobsync) — verify it builds on nix-container-builder only - [ ] Push a change to a dual container (e.g. ntfy) — verify it builds on both runners - [ ] Test workflow_dispatch with a specific container name 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #306
This commit is contained in:
parent
4cc26ed5eb
commit
bd0ff30d3f
12 changed files with 124 additions and 365 deletions
|
|
@ -15,7 +15,7 @@ Add Dagger functions for building nix container images and extracting version in
|
|||
|
||||
## Context
|
||||
|
||||
Discovered during analysis of [[adopt-commit-based-container-tags]]: nix containers (authentik, ntfy, nettest) derive their bundled app version from the nixpkgs pin, not from an explicit declaration. To validate that a VERSION file matches the actual nix-built version, we need a way to query the version from nix.
|
||||
Discovered during analysis of [[adopt-commit-based-container-tags]]: nix containers (authentik, ntfy) derive their bundled app version from the nixpkgs pin, not from an explicit declaration. To validate that a VERSION file matches the actual nix-built version, we need a way to query the version from nix.
|
||||
|
||||
Currently, nix containers can only be built on ringtail (the `nix-container-builder` runner). There is no local build path for developers — the only option is to push and wait for CI. Adding a Dagger-based nix build gives both local evaluation and version extraction.
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ The `flake_lock` function already demonstrates running nix inside Dagger using `
|
|||
|
||||
## Verification
|
||||
|
||||
- [ ] `dagger call build-nix --src=. --container-name=nettest` produces a valid docker-archive tarball
|
||||
- [ ] `dagger call build-nix --src=. --container-name=ntfy` produces a valid docker-archive tarball
|
||||
- [ ] `dagger call nix-version --src=. --package=ntfy-sh` returns the correct version string
|
||||
- [ ] `dagger call nix-version --src=. --package=authentik` returns the Authentik version
|
||||
- [ ] Tarball from `build-nix` can be loaded with `docker load` and run locally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue