Files
kms/.github/workflows/build-lux-kms.yml
T
zeekayandHanzo Dev 525646f150 ci: restore the kms build workflow
299b230 deleted this in favour of platform.hanzo.ai native builds (hanzo.yml).
The native plane does not serve yet — the platform Deployment is scaled to 0/0
and PLATFORM_BUILD_CALLBACK_TOKEN, the bearer POST /v1/runner requires, is in
neither cluster — so the cutover left kms the one repo in the fleet that could
not build at all, while every sibling kept building on Actions (luxfi/node has
19 active workflows, hanzoai/gateway 3, hanzoai/commerce 1).

The 422 that motivated the cutover, "Actions has been disabled for this user",
is account-scoped rather than repo-scoped: hanzo-dev gets it, zeekay does not.
Push-triggered runs separately stopped firing around 2026-07-24, so builds want
an explicit dispatch regardless.

hanzo.yml stays and now says plainly that it is intent, not the live path. Cut
over when the native plane serves, and fleet-wide rather than one repo at a time.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-26 01:14:27 -07:00

90 lines
3.0 KiB
YAML

name: Build KMS
# RESTORED. This was deleted in efed0f0 in favour of platform.hanzo.ai's native
# build plane (see hanzo.yml), which left kms the ONE repo in the fleet that
# could not build at all: the platform Deployment is scaled to 0/0 and
# PLATFORM_BUILD_CALLBACK_TOKEN — the bearer POST /v1/runner requires — is in
# neither cluster. Meanwhile every sibling still builds here (luxfi/node has 19
# active workflows, hanzoai/gateway 3, hanzoai/commerce 1). Cutting one repo over
# ahead of the others bought inconsistency and no builds.
#
# hanzo.yml stays as the declaration of intent. Delete THIS file when the native
# plane actually serves — and do it fleet-wide, not one repo at a time.
#
# Note: push-triggered runs stopped firing across these repos around 2026-07-24;
# dispatch explicitly (`gh workflow run build-lux-kms.yml --ref <ref>`), and note
# that the hanzo-dev account gets 422 "Actions has been disabled for this user"
# while zeekay does not.
#
# Self-contained — calling hanzoai/.github/.github/workflows/docker-build.yml@main
# via `secrets: inherit` triggers a cross-org startup_failure (organization
# secrets aren't inherited across orgs even with `inherit`). Same pattern
# already used by build-server-self.yml.
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
runs-on: lux-build
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Compute tags
id: meta
run: |
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VERSION="${GITHUB_REF#refs/tags/v}"
{
echo "tags<<EOF"
echo "ghcr.io/luxfi/kms:v${VERSION}"
echo "ghcr.io/luxfi/kms:${VERSION}"
echo "ghcr.io/luxfi/kms:sha-${GITHUB_SHA:0:7}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
else
{
echo "tags<<EOF"
echo "ghcr.io/luxfi/kms:sha-${GITHUB_SHA:0:7}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
fi
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push (linux/amd64, with embedded SPA)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Summary
run: |
echo "### Build complete" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo '${{ steps.meta.outputs.tags }}' >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"