From a1104f199f08aabfb38442b4deed725904b8cbe3 Mon Sep 17 00:00:00 2001 From: Elias Kohout Date: Thu, 2 Apr 2026 04:13:53 +0200 Subject: [PATCH] feat: build APK packages for x86_64 and aarch64 Uses a matrix strategy with Go cross-compilation (GOARCH + CARCH) so both architectures build in the same amd64 container. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/apk-publish.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/apk-publish.yml b/.gitea/workflows/apk-publish.yml index c4b7fed..4fc8ecd 100644 --- a/.gitea/workflows/apk-publish.yml +++ b/.gitea/workflows/apk-publish.yml @@ -10,6 +10,14 @@ jobs: - ubuntu-24.04 container: image: alpine:latest + options: --platform linux/amd64 + strategy: + matrix: + include: + - goarch: amd64 + pkgarch: x86_64 + - goarch: arm64 + pkgarch: aarch64 steps: - name: Install build dependencies run: | @@ -39,6 +47,7 @@ jobs: pkgname="axolotl" sed -i "s/pkgver=.*/pkgver=$pkgver/" packaging/alpine/APKBUILD + sed -i "s/^arch=.*/arch=\"${{ matrix.pkgarch }}\"/" packaging/alpine/APKBUILD git archive --format=tar.gz --prefix="$pkgname-$pkgver/" -o "packaging/alpine/$pkgname-$pkgver.tar.gz" HEAD @@ -49,7 +58,7 @@ jobs: run: su build -c "cd $PWD/packaging/alpine && abuild checksum" - name: Build package - run: su build -c "cd $PWD/packaging/alpine && abuild -r" + run: su build -c "cd $PWD/packaging/alpine && GOARCH=${{ matrix.goarch }} CARCH=${{ matrix.pkgarch }} abuild -r" - name: Publish to Gitea Registry run: |