pyblock/.github/workflows/docker-build.yml
GaltRanch 6fad893db8 Update Dockerfile for Umbrel + add multi-arch CI build
Dockerfile changes:
- Use COPY instead of git clone (build from local source)
- Add entrypoint.sh for auto-configuration from env vars
- EXPOSE 6969 and configurable via PYBLOCK_PORT env var
- Create config directory as volume mount point
- ENTRYPOINT replaces CMD for pre-launch setup

New .github/workflows/docker-build.yml:
- Multi-arch build: linux/amd64 + linux/arm64 (Raspberry Pi)
- Triggers on version tags (v*.*.*)
- Pushes to Docker Hub as curly60e/pyblock:version and :latest
- Uses QEMU + Buildx for cross-compilation
- GitHub Actions cache for faster builds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 16:33:03 -03:00

44 lines
1.1 KiB
YAML

name: Build Multi-Arch Docker Image
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up QEMU for multi-arch
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Build and push multi-arch image
uses: docker/build-push-action@v5
with:
context: .
file: ./dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
curly60e/pyblock:${{ steps.version.outputs.VERSION }}
curly60e/pyblock:latest
cache-from: type=gha
cache-to: type=gha,mode=max