Files
zooqueen 76edfcdef6 ci: publish a version for this image, not only a commit
.hanzo/workflows/deploy.yml built and pushed ghcr.io/hanzoai/index itself and
tagged a branch build `sha-<sha7>`. That is the only tag this image has ever
carried, so the deployment running it can pin nothing but a commit. hanzo.yml
declared no `images:`, so the canonical caller beside it ran the cargo gate and
published nothing — the gate lane and the image lane were separate, and only
the hand-rolled one produced bytes.

Declare the image in hanzo.yml and delete deploy.yml. One lane now: hanzoai/ci's
build.yml runs the gate and then builds, so a red `cargo check` stops the image
instead of arriving alongside it. Every push publishes the semver bin/imgver
derives plus `sha-<sha7>-amd64`, the shape the rest of the fleet writes.

The number is not stated here. imgver reads `version` from Cargo.toml's
[workspace.package] — 1.45.2, what these crates already publish under — and
takes max(it, the highest semver at the registry) plus a patch, so the series
starts at 1.45.2 and moves when Cargo.toml does.
2026-08-12 20:07:35 -07:00

46 lines
2.2 KiB
YAML

# hanzoai/index — the search engine behind ghcr.io/hanzoai/index (Rust
# workspace: routes, milli, index-scheduler, filter-parser, dump, and the rest).
#
# ONE lane: this file and .hanzo/workflows/cicd.yml. The gate below runs, then
# hanzoai/ci's build.yml builds and publishes the image. It replaces
# .hanzo/workflows/deploy.yml, a hand-rolled buildx job that tagged a branch
# build `sha-<sha7>` and nothing else, so this image had no version to pin and
# the deployment that runs it could only name a commit. Two lanes pushing one
# image name is two builds that can disagree about what `index` is.
#
# THE VERSION IS NOT TYPED HERE. bin/imgver reads `version` from Cargo.toml's
# [workspace.package] — the number every crate in this workspace already
# publishes under, 1.45.2 today — and takes max(it, the highest semver already
# at the registry) plus a patch. So the series starts where the workspace says
# it is and moves when a human edits Cargo.toml, which stays the one place this
# repo states its version.
#
# The sha tag changes shape with the lane: `sha-<sha7>-amd64`, what the rest of
# the fleet publishes, alongside the semver. amd64 only — DOKS schedules no
# other architecture.
images:
- name: index
context: .
dockerfile: Dockerfile
repo: ghcr.io/hanzoai/index
# This gate is strictly cheaper than the failure it prevents. A break in milli
# used to surface in the image build, after a full release-mode compile; `cargo
# check` runs the compiler's front end over the same 24 crates — resolution,
# typeck, borrowck, no codegen — and fails in a fraction of that, before buildx
# starts. --locked so an out-of-date Cargo.lock is a red run rather than a
# silent re-resolve to versions the image will never contain.
#
# The C toolchain is provisioned here because hanzoai/ci installs one only for
# Go repos (its step is guarded on go.mod), and this workspace does not get past
# its build scripts without a cc — heed/LMDB compiles C. Guarded, so it is a
# no-op the moment a runner image bakes it in.
test:
- name: cargo-check
run: |
set -euo pipefail
if ! command -v cc >/dev/null 2>&1; then
sudo apt-get update -qq && sudo apt-get install -y -qq build-essential
fi
cargo check --workspace --locked