57 lines
1.6 KiB
YAML
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: [self-hosted, 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.GITEA_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 |