ci: migrate to canonical docker-build reusable workflow

Replace bespoke 59-line docker build with the 10-line canonical caller
that uses hanzoai/.github/.github/workflows/docker-build.yml@main.

Native amd64+arm64 ARC runners, semver + branch tags, multi-arch manifest
via the one shared workflow path. Cache-key preserved for scope=kv.
This commit is contained in:
Hanzo AI
2026-04-23 18:07:23 -07:00
parent 098c704063
commit 00283742b9
+12 -51
View File
@@ -1,58 +1,19 @@
name: Build and Deploy Hanzo KV
name: Docker
on:
workflow_dispatch:
push:
branches: [main, dev, test]
tags: ['v*']
paths:
- 'src/**'
- 'deps/**'
- 'Dockerfile'
- '.github/workflows/deploy.yml'
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/hanzoai/kv
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=9,enable={{is_default_branch}}
type=sha,prefix=
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=kv
cache-to: type=gha,mode=max,scope=kv
docker:
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
with:
image: ghcr.io/hanzoai/kv
cache-key: kv
secrets: inherit