feat(runner): add Android-augmented job image #1
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/android-runner-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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— inheritsforgejo-stack/job:latestand adds JDK 17 (Temurin) + Android cmdline-tools +platforms;android-35+build-tools;35.0.0.setup.sh— buildsforgejo-stack/job-android:latestafter the main image. Gated onRUNNER_BUILD_ANDROID_IMAGE(defaulttrue); set tofalseto skip on hosts that don't serve Android workflows..env.example— documentsRUNNER_BUILD_ANDROID_IMAGEandRUNNER_ANDROID_JOB_IMAGE..gitignore— adds.worktrees/(first worktree for this repo).How consumers opt in
First consumer: exifcleaner-web PR #156 (
feat(android): Capacitor APK wrapper + on-demand CI build).Trade-offs
docker image rmis run manually).hostedtoolcacheimpact — the Android tools live in$ANDROID_HOME=/usr/local/lib/android/sdkand$JAVA_HOME(apt-installed JDK), neither under/opt/hostedtoolcache. Existing toolcache seeding from the main image is untouched.Verification (manual)
RUNNER_BUILD_ANDROID_IMAGE=true ./setup.sh— confirms the image builds (takes ~5 min cold).docker run --rm forgejo-stack/job-android:latest sh -c 'java -version && sdkmanager --list_installed'— confirms toolchain reachable.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.