feat(runner): add Android-augmented job image #1

Merged
forgejo_admin merged 1 commit from feat/android-runner-image into master 2026-05-17 11:41:18 +00:00

Adds an opt-in Android job image so workflows like exifcleaner-web's APK build skip the ~3-5 min cold Android SDK install per run.

What

  • runner-image-android/Dockerfile — inherits forgejo-stack/job:latest and adds JDK 17 (Temurin) + Android cmdline-tools + platforms;android-35 + build-tools;35.0.0.
  • setup.sh — builds forgejo-stack/job-android:latest after the main image. Gated on RUNNER_BUILD_ANDROID_IMAGE (default true); set to false to skip on hosts that don't serve Android workflows.
  • .env.example — documents RUNNER_BUILD_ANDROID_IMAGE and RUNNER_ANDROID_JOB_IMAGE.
  • .gitignore — adds .worktrees/ (first worktree for this repo).

How consumers opt in

jobs:
  build-apk:
    runs-on: ubuntu-latest
    container: forgejo-stack/job-android:latest

First consumer: exifcleaner-web PR #156 (feat(android): Capacitor APK wrapper + on-demand CI build).

Trade-offs

  • Default image stays slim. Non-Android workflows pay no disk cost.
  • Disk cost on hosts that build it: ~1.2 GB extra (image layer). One-time per host.
  • Build time: ~5 min on first setup; rebuilds only when the Dockerfile changes (or docker image rm is run manually).
  • No shared hostedtoolcache impact — the Android tools live in $ANDROID_HOME=/usr/local/lib/android/sdk and $JAVA_HOME (apt-installed JDK), neither under /opt/hostedtoolcache. Existing toolcache seeding from the main image is untouched.

Verification (manual)

  1. RUNNER_BUILD_ANDROID_IMAGE=true ./setup.sh — confirms the image builds (takes ~5 min cold).
  2. docker run --rm forgejo-stack/job-android:latest sh -c 'java -version && sdkmanager --list_installed' — confirms toolchain reachable.
  3. Dispatch the exifcleaner-web Android workflow once PR #156 is merged.
Adds an opt-in Android job image so workflows like exifcleaner-web's APK build skip the ~3-5 min cold Android SDK install per run. ## What - `runner-image-android/Dockerfile` — inherits `forgejo-stack/job:latest` and adds JDK 17 (Temurin) + Android cmdline-tools + `platforms;android-35` + `build-tools;35.0.0`. - `setup.sh` — builds `forgejo-stack/job-android:latest` after the main image. Gated on `RUNNER_BUILD_ANDROID_IMAGE` (default `true`); set to `false` to skip on hosts that don't serve Android workflows. - `.env.example` — documents `RUNNER_BUILD_ANDROID_IMAGE` and `RUNNER_ANDROID_JOB_IMAGE`. - `.gitignore` — adds `.worktrees/` (first worktree for this repo). ## How consumers opt in ```yaml jobs: build-apk: runs-on: ubuntu-latest container: forgejo-stack/job-android:latest ``` First consumer: exifcleaner-web PR #156 (`feat(android): Capacitor APK wrapper + on-demand CI build`). ## Trade-offs - **Default image stays slim.** Non-Android workflows pay no disk cost. - **Disk cost on hosts that build it:** ~1.2 GB extra (image layer). One-time per host. - **Build time:** ~5 min on first setup; rebuilds only when the Dockerfile changes (or `docker image rm` is run manually). - **No shared `hostedtoolcache` impact** — the Android tools live in `$ANDROID_HOME=/usr/local/lib/android/sdk` and `$JAVA_HOME` (apt-installed JDK), neither under `/opt/hostedtoolcache`. Existing toolcache seeding from the main image is untouched. ## Verification (manual) 1. `RUNNER_BUILD_ANDROID_IMAGE=true ./setup.sh` — confirms the image builds (takes ~5 min cold). 2. `docker run --rm forgejo-stack/job-android:latest sh -c 'java -version && sdkmanager --list_installed'` — confirms toolchain reachable. 3. Dispatch the exifcleaner-web Android workflow once PR #156 is merged.
forgejo_admin added 1 commit 2026-05-17 11:38:43 +00:00
New `runner-image-android/Dockerfile` inherits forgejo-stack/job:latest
and bakes in JDK 17 (Temurin) plus Android cmdline-tools, platforms;android-35,
and build-tools;35.0.0. Workflows opt in via:

    container: forgejo-stack/job-android:latest

setup.sh builds the image automatically (gated on RUNNER_BUILD_ANDROID_IMAGE,
default true). The default forgejo-stack/job:latest stays slim — non-Android
workflows pay no disk cost.

Cold APK build time drops from ~10-15 min to ~3-5 min (gradle deps + build).
The exifcleaner-web Android workflow is the first consumer; see PR #156.
forgejo_admin merged commit 5c3e33ced3 into master 2026-05-17 11:41:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo_admin/forgejo-stack#1
No description provided.