The image supports both RPi 5 and CM5 (same SoC/RP1), so talos-rpi5 is a better public-facing name. The internal build still produces an installer image which gets retagged to svrnty/talos-rpi5:<tag> in the release target. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
104 lines
3.0 KiB
YAML
104 lines
3.0 KiB
YAML
# Build and release custom Talos CM5 image
|
|
#
|
|
# Triggered by pushing a version tag (e.g. v1.11.5-1)
|
|
# Runs on ARM64 self-hosted runner (ASUS GX10)
|
|
#
|
|
# Produces:
|
|
# - Installer container image → Docker Hub (svrnty/talos-rpi5:<tag>)
|
|
# - Raw disk image → Gitea release (metal-arm64.raw.zst)
|
|
|
|
name: Build Talos CM5 Image
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [self-hosted, linux, arm64]
|
|
timeout-minutes: 180
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- 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 tag
|
|
id: version
|
|
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Clone upstream sources
|
|
run: make checkouts
|
|
|
|
- name: Apply patches
|
|
run: make patches
|
|
|
|
- name: Build kernel
|
|
run: make kernel
|
|
|
|
- name: Build SBC overlay
|
|
run: make overlay
|
|
|
|
- name: Build installer and disk image
|
|
run: make installer
|
|
|
|
- name: Tag release images
|
|
run: make release TAG=${{ steps.version.outputs.tag }}
|
|
|
|
- name: Compress disk image
|
|
run: |
|
|
# The imager outputs to checkouts/talos/_out/
|
|
DISK_IMAGE=$(find checkouts/talos/_out -name 'metal-arm64*.raw*' | head -1)
|
|
if [ -z "$DISK_IMAGE" ]; then
|
|
echo "Error: disk image not found in checkouts/talos/_out/"
|
|
find checkouts/talos/_out -type f
|
|
exit 1
|
|
fi
|
|
# Copy to workspace root for release upload
|
|
cp "$DISK_IMAGE" metal-arm64.raw.zst
|
|
ls -lh metal-arm64.raw.zst
|
|
|
|
- name: Create Gitea release
|
|
uses: actions/forgejo-release@v2
|
|
with:
|
|
direction: upload
|
|
tag: ${{ steps.version.outputs.tag }}
|
|
title: "Talos CM5 ${{ steps.version.outputs.tag }}"
|
|
release-notes: |
|
|
Custom Talos Linux image for Raspberry Pi CM5 (Compute Blade)
|
|
|
|
**Talos version**: check Makefile
|
|
**Kernel**: RPi downstream (CM5/RP1 support)
|
|
**Extensions**: iscsi-tools, util-linux-tools
|
|
**Overclock**: 2.6GHz (arm_freq=2600)
|
|
|
|
## Artifacts
|
|
- `metal-arm64.raw.zst` — Raw disk image for eMMC flashing
|
|
- `docker.io/svrnty/talos-rpi5:${{ steps.version.outputs.tag }}` — Installer image for `talosctl upgrade`
|
|
|
|
## Usage
|
|
```bash
|
|
# Flash to eMMC
|
|
./scripts/flash-emmc.sh metal-arm64.raw.zst
|
|
|
|
# Upgrade existing node
|
|
talosctl upgrade --image docker.io/svrnty/talos-rpi5:${{ steps.version.outputs.tag }}
|
|
```
|
|
release-dir: .
|
|
release-notes-assistant: none
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Clean up
|
|
if: always()
|
|
run: make clean
|