Migrate Docker build to shared reusable workflow

Replace custom docker/build-push-action steps with
hanzoai/.github/.github/workflows/docker-build.yml@main.
This gives us proper multi-arch manifest support and
consistent build infrastructure across all repos.

amd64-only until arm64 runner is restored.
This commit is contained in:
2026-03-24 22:32:31 -07:00
parent d83963f988
commit a6b5e86e77
+10 -50
View File
@@ -2,57 +2,17 @@ name: Build and Push Docker Image
on:
push:
branches: [ main, test, dev ]
tags: [ 'v*' ]
branches: [main, test, dev]
tags: ['v*']
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
if: github.event_name != 'pull_request'
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=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
docker:
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
with:
image: ghcr.io/hanzoai/flow
# arm64 runner offline — build amd64 only until runner is restored
platforms: linux/amd64
secrets: inherit