Skip to content

Bake IIAB-oA RootFS Images #6

Bake IIAB-oA RootFS Images

Bake IIAB-oA RootFS Images #6

Workflow file for this run

name: Bake IIAB-oA RootFS Images
on:
# 1. Manual trigger via GitHub UI
workflow_dispatch:
inputs:
tier_size:
description: 'IIAB-oA Tier to build'
required: true
default: 'all'
type: choice
options:
- '1'
- '2'
- '3'
- 'all'
# 2. Scheduled trigger (every Sunday at 04:00 AM UTC)
schedule:
- cron: '0 4 * * 0'
# 3. Release trigger, when a tagged release is pushed.
push:
tags:
- 'v*'
jobs:
bake-rootfs:
name: Tier ${{ matrix.tier }} (${{ matrix.arch.android }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tier: ['1', '2', '3']
arch:
- android: "arm64-v8a"
debian: "aarch64"
docker: "linux/arm64"
- android: "armeabi-v7a"
debian: "arm"
docker: "linux/arm/v7"
steps:
- name: Set up QEMU for ARM emulation
if: github.event_name != 'workflow_dispatch' || inputs.tier_size == 'all' || inputs.tier_size == matrix.tier
uses: docker/setup-qemu-action@v3
- name: Download and prepare clean Debian base
if: github.event_name != 'workflow_dispatch' || inputs.tier_size == 'all' || inputs.tier_size == matrix.tier
run: |
wget https://iiab.switnet.org/android/rootfs/proot-distro-v4.29.0/debian-trixie-${{ matrix.arch.debian }}-pd-v4.29.0.tar.xz
mkdir rootfs
# Extract the tarball, stripping the parent directory to expose /bin, /etc, etc., at the root
tar --exclude='*/dev/*' --strip-components=1 -xf debian-trixie-${{ matrix.arch.debian }}-pd-v4.29.0.tar.xz -C rootfs
- name: Create Docker Image from Base
if: github.event_name != 'workflow_dispatch' || inputs.tier_size == 'all' || inputs.tier_size == matrix.tier
# Dynamically package the rootfs folder directly into Docker using the correct platform
run: |
tar -cC rootfs . | docker import --platform ${{ matrix.arch.docker }} - debian-iiab-base:trixie
- name: Run IIAB-oA Installer inside Emulator (Grab a coffee ☕)
if: github.event_name != 'workflow_dispatch' || inputs.tier_size == 'all' || inputs.tier_size == matrix.tier
run: |
docker run --name iiab_baker \
--platform ${{ matrix.arch.docker }} \
-e AUTO_INSTALL_SIZE=${{ matrix.tier }} \
-e DEBIAN_FRONTEND=noninteractive \
debian-iiab-base:trixie \
/bin/bash -c "mkdir -p /tmp && chmod 1777 /tmp && apt-get update && apt-get install -y curl ca-certificates && curl -fsSL https://raw.githubusercontent.com/appdevforall/iiab-android/main/iiab-android -o /usr/local/sbin/iiab-android && chmod +x /usr/local/sbin/iiab-android && /usr/local/sbin/iiab-android -f"
- name: Export and Compress Final RootFS
if: github.event_name != 'workflow_dispatch' || inputs.tier_size == 'all' || inputs.tier_size == matrix.tier
run: |
docker export iiab_baker > final_rootfs.tar
xz -T0 -9 final_rootfs.tar
mv final_rootfs.tar.xz latest_tier${{ matrix.tier }}_${{ matrix.arch.android }}.tar.xz
- name: Upload Artifact
if: github.event_name != 'workflow_dispatch' || inputs.tier_size == 'all' || inputs.tier_size == matrix.tier
uses: actions/upload-artifact@v4
with:
name: baked-rootfs-tier${{ matrix.tier }}-${{ matrix.arch.android }}
path: latest_tier${{ matrix.tier }}_${{ matrix.arch.android }}.tar.xz