Skip to content

fix: add ARM64 support for Hetzner server #5

fix: add ARM64 support for Hetzner server

fix: add ARM64 support for Hetzner server #5

Workflow file for this run

name: Build TPC OpenClaw Image
on:
push:
tags:
- 'tpc-*' # e.g. tpc-2026.3.15
workflow_dispatch: # Manual trigger from GitHub UI
inputs:
push:
description: 'Push to GHCR?'
type: boolean
default: true
env:
REGISTRY: ghcr.io
BASE_IMAGE: ghcr.io/${{ github.repository }}
TPC_IMAGE: ghcr.io/${{ github.repository }}-tpc
jobs:
build-base:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
tag: ${{ steps.version.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU (for ARM64 cross-compilation)
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: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from tag
id: version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
else
echo "tag=dev-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
fi
- name: Build and push base OpenClaw image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.BASE_IMAGE }}:${{ steps.version.outputs.tag }}
${{ env.BASE_IMAGE }}:latest
cache-from: type=gha,scope=base
cache-to: type=gha,scope=base,mode=max
build-tpc:
runs-on: ubuntu-latest
needs: build-base
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU (for ARM64 cross-compilation)
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: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push TPC OpenClaw image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.tpc
platforms: linux/amd64,linux/arm64
build-args: |
BASE_IMAGE=${{ env.BASE_IMAGE }}:${{ needs.build-base.outputs.tag }}
push: ${{ github.event_name == 'push' || inputs.push }}
tags: |
${{ env.TPC_IMAGE }}:${{ needs.build-base.outputs.tag }}
${{ env.TPC_IMAGE }}:latest
cache-from: type=gha,scope=tpc
cache-to: type=gha,scope=tpc,mode=max
- name: Summary
run: |
echo "### Built images" >> "$GITHUB_STEP_SUMMARY"
echo "- Base: \`${{ env.BASE_IMAGE }}:${{ needs.build-base.outputs.tag }}\`" >> "$GITHUB_STEP_SUMMARY"
echo "- TPC: \`${{ env.TPC_IMAGE }}:${{ needs.build-base.outputs.tag }}\`" >> "$GITHUB_STEP_SUMMARY"
echo "- Platforms: linux/amd64, linux/arm64" >> "$GITHUB_STEP_SUMMARY"