ci: switch to org-wide reusable Docker build workflow (#2)

Native amd64 (hanzo-build) + arm64 (hanzo-build-arm64) builds.
No QEMU. Uses hanzoai/.github/.github/workflows/docker-build.yml

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-03-02 08:28:24 -08:00
committed by GitHub
co-authored by Hanzo Dev
parent 853a86b8da
commit c4800c3e8d
+10 -83
View File
@@ -1,92 +1,19 @@
name: Build and Push Docker Images
name: Docker Release
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
tags: ["v*"]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: hanzoai/agent
concurrency:
group: docker-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
sdk:
name: Build SDK Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
docker:
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
with:
image: ghcr.io/hanzoai/agent
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=sdk-latest,enable={{is_default_branch}}
type=raw,value=sdk-${{ github.sha }}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push SDK image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.sdk
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=sdk
cache-to: type=gha,mode=max,scope=sdk
control-plane:
name: Build Control Plane Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=control-plane-latest,enable={{is_default_branch}}
type=raw,value=control-plane-${{ github.sha }}
- name: Build and push control-plane image
uses: docker/build-push-action@v5
with:
context: .
file: deployments/docker/Dockerfile.control-plane
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=control-plane
cache-to: type=gha,mode=max,scope=control-plane
secrets: inherit