Files
Busch-Radio-Spotify/.gitea/workflows/images.yml
T
Niklas GühneandClaude Opus 5.5 8350b08368
Images / images (push) Failing after 3s
v1.1.2: fertige Images aus der Gitea-Registry statt Build auf dem Gerät
- .gitea/workflows/images.yml baut amd64 + aarch64 (QEMU) bei v*-Tags und pusht nach
  gitea.bitfire.work/retr0/busch-radio-spotify-{arch}
- config.yaml: image: gesetzt, armhf/armv7 entfernt (rust:alpine gibt es dort nicht, Build ging nie)
- io.hass-Labels im Dockerfile, Doku angepasst

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGNdWh2jLNNb3tb9v1WEuK
2026-11-04 16:13:06 +01:00

51 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Images
# Baut die fertigen Add-on-Images (amd64 + aarch64) und legt sie in die Gitea-Registry.
# HA lädt sie dann nur noch herunter, statt 15 min (Pi: über 1 h) selbst zu bauen.
#
# Release-Reihenfolge (HA liest config.yaml vom main-Branch!):
# 1. Version in config.yaml erhöhen, auf einem Branch committen und dort v<version> taggen
# 2. Dieser Workflow baut und pusht die Images (aarch64 per QEMU, dauert entsprechend)
# 3. Erst danach den Branch nach main bringen – sonst bieten HA-Instanzen ein Update an,
# dessen Image es noch nicht gibt.
on:
push:
tags: ["v*"]
workflow_dispatch:
jobs:
images:
# LXC 113 auf dem Proxmox (Docker + QEMU-binfmt vom Host)
runs-on: linux-x64
timeout-minutes: 300
steps:
- uses: actions/checkout@v4
- name: Bauen und hochladen
shell: bash
env:
# Eigenes Token (nur write:package) als Repo-Secret REGISTRY_TOKEN, sonst das automatische Workflow-Token
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN || gitea.token }}
REGISTRY_USER: ${{ secrets.REGISTRY_TOKEN && 'retr0' || gitea.actor }}
run: |
set -euo pipefail
V=$(sed -n 's/^version: "\(.*\)"/\1/p' busch_radio_spotify/config.yaml)
if [ "${GITHUB_REF_TYPE:-}" = "tag" ] && [ "${GITHUB_REF_NAME#v}" != "$V" ]; then
echo "Tag ${GITHUB_REF_NAME} passt nicht zu config.yaml-Version ${V}"; exit 1
fi
REG=gitea.bitfire.work
R=$REG/retr0/busch-radio-spotify
echo "$REGISTRY_TOKEN" | docker login "$REG" -u "$REGISTRY_USER" --password-stdin
for a in amd64:linux/amd64 aarch64:linux/arm64; do
arch=${a%%:*}; plat=${a#*:}
echo "::group::$arch ($plat)"
DOCKER_BUILDKIT=1 docker build --pull --platform "$plat" \
--build-arg BUILD_FROM=ghcr.io/hassio-addons/debian-base:9.5.0 \
--build-arg BUILD_ARCH="$arch" --build-arg BUILD_VERSION="$V" \
-t "$R-$arch:$V" -t "$R-$arch:latest" busch_radio_spotify
docker push -q "$R-$arch:$V"
docker push -q "$R-$arch:latest"
echo "::endgroup::"
done
docker logout "$REG"
# ponytail: aarch64 kompiliert librespot unter QEMU (langsam); Cross-Compile, falls Releases häufiger werden