add Android app to README, CI workflow for APK builds

- README: add Fitness section with APK download link
- Dockerfile.android: containerized build with Rust, Android SDK/NDK,
  Java 21, Node 22, pnpm — builds and signs the APK
- CI workflow: builds APK in container on push, deploys to
  bocken.org/static/Bocken.apk via SCP
This commit is contained in:
2026-03-24 18:28:23 +01:00
parent 8fff5f14b5
commit fe49c5b997
3 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
name: Android APK
on:
push:
branches: [ master ]
paths:
- 'src-tauri/**'
- 'src/**'
- 'static/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'Dockerfile.android'
- '.gitea/workflows/android.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build APK in container
run: |
docker build -f Dockerfile.android -t bocken-android .
docker create --name apk-extract bocken-android
docker cp apk-extract:/tmp/Bocken.apk ./Bocken.apk
docker rm apk-extract
- name: Deploy APK to server
uses: appleboy/scp-action@master
with:
host: bocken.org
username: homepage
key: ${{ secrets.homepage_ssh }}
passphrase: ${{ secrets.homepage_pass }}
port: 22
source: "Bocken.apk"
target: "/var/www/static/"

52
Dockerfile.android Normal file
View File

@@ -0,0 +1,52 @@
FROM rust:1.87-bookworm
# Java 21
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-21-jdk-headless unzip wget curl && \
rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
# Android SDK
ENV ANDROID_HOME=/opt/android-sdk
RUN mkdir -p "$ANDROID_HOME/cmdline-tools" && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O /tmp/tools.zip && \
unzip -q /tmp/tools.zip -d "$ANDROID_HOME/cmdline-tools" && \
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest" && \
rm /tmp/tools.zip
ENV PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH"
RUN yes | sdkmanager --licenses > /dev/null 2>&1 && \
sdkmanager "platforms;android-36" "build-tools;35.0.0" "ndk;27.0.12077973"
ENV NDK_HOME="$ANDROID_HOME/ndk/27.0.12077973"
# Rust Android targets
RUN rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
# Node 22 + pnpm
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
npm install -g pnpm@latest && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install deps first (cache layer)
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy source
COPY . .
# Build APK
RUN pnpm tauri android build --apk
# Sign APK
RUN keytool -genkey -v -keystore /tmp/debug.keystore \
-alias debug -keyalg RSA -keysize 2048 -validity 10000 \
-storepass android -keypass android \
-dname "CN=Debug,O=Bocken,C=DE" && \
"$ANDROID_HOME/build-tools/35.0.0/zipalign" -f -v 4 \
src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk \
/tmp/Bocken.apk > /dev/null && \
"$ANDROID_HOME/build-tools/35.0.0/apksigner" sign \
--ks /tmp/debug.keystore --ks-pass pass:android --key-pass pass:android \
/tmp/Bocken.apk

View File

@@ -10,6 +10,11 @@ Bilingual recipe collection with search, category filtering, and seasonal recomm
### Faith (`/glaube` · `/faith`) ### Faith (`/glaube` · `/faith`)
Catholic prayer collection in German, English, and Latin. Includes an interactive Rosary with scroll-synced SVG bead visualization, mystery images (sticky column on desktop, draggable PiP on mobile), decade progress tracking, and a daily streak counter. Adapts prayers for liturgical seasons like Eastertide. Catholic prayer collection in German, English, and Latin. Includes an interactive Rosary with scroll-synced SVG bead visualization, mystery images (sticky column on desktop, draggable PiP on mobile), decade progress tracking, and a daily streak counter. Adapts prayers for liturgical seasons like Eastertide.
### Fitness (`/fitness`)
Workout tracker with template-based training plans, set logging with RPE, rest timers synced across devices via SSE, workout history with statistics, and body measurement tracking. Cardio exercises support native GPS tracking via the Android app with background location recording.
**Android app**: [Download APK](https://bocken.org/static/Bocken.apk) — Tauri v2 shell with native GPS foreground service for screen-off tracking, live notification with elapsed time, distance, and pace.
### Expense Sharing (`/cospend`) ### Expense Sharing (`/cospend`)
Shared expense tracker with balance dashboards, debt breakdowns, monthly bar charts with category filtering, and payment management. Shared expense tracker with balance dashboards, debt breakdowns, monthly bar charts with category filtering, and payment management.