Files
android/.gitea/workflows/builder-image.yml
Robert Helewka 2e6cac3d5d ci: use PACKAGE_TOKEN for the registry login
GITEA_TOKEN is not set in these repos — the registry login sent a blank
password and Gitea's /v2/ endpoint returned unauthorized. Switch the
image-build login, the app template, and the README to PACKAGE_TOKEN, the
PAT the other repos already use (Syrinx pairs gitea.actor + PACKAGE_TOKEN
successfully). The PAT needs write:package here and read:package in app
repos.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 08:53:31 -04:00

57 lines
1.6 KiB
YAML

name: build-android-builder-image
# Builds the Android toolchain image and pushes it to the Gitea registry.
# Push a tag like `2026.06` to cut an immutable toolchain; pushes to main
# refresh the moving `latest` tag.
on:
push:
branches: [main]
tags: ["*"]
workflow_dispatch:
env:
REGISTRY: git.helu.ca
IMAGE: git.helu.ca/r/android
jobs:
build-image:
runs-on: ubuntu-24.04-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
# Determine which tags to push:
# - a git tag -> use it verbatim (e.g. 2026.06) + latest
# - main branch -> latest only
- name: Compute tags
id: tags
run: |
if [ "${{ gitea.ref_type }}" = "tag" ]; then
REF="${{ gitea.ref_name }}"
echo "tags=${IMAGE}:${REF},${IMAGE}:latest" >> "$GITHUB_OUTPUT"
else
echo "tags=${IMAGE}:latest" >> "$GITHUB_OUTPUT"
fi
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push (linux/arm64)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/arm64
push: true
tags: ${{ steps.tags.outputs.tags }}
# Bump these here if you want to override the Dockerfile defaults
# build-args: |
# BUILD_TOOLS_VERSION=35.0.0
# PLATFORM_VERSION=android-35