Files
kochwas/.gitea/workflows/docker.yml
Hendrik 5fbb90745d
Some checks failed
Build & Publish Docker Image / build-and-push (push) Failing after 3m48s
ci: build for linux/arm64 (Raspberry Pi 5 target)
Runner is arm64, so native build is much faster than amd64-via-QEMU.
Dev/test amd64 images can still be built locally with 'docker build'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 15:57:55 +02:00

57 lines
1.5 KiB
YAML

name: Build & Publish Docker Image
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:
env:
REGISTRY: gitea.siegeln.net
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
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 Gitea container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Derive tags
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha,format=short
type=raw,value=latest,enable=${{ gitea.ref == 'refs/heads/main' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
# Target: Raspberry Pi 5 (arm64). Runner is arm64 too, so this is native + fast.
# amd64 is buildable locally via `docker build` on dev machines.
platforms: linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max