Move APK runner to a separate host; openssl-based keystore

- gen-keystore.sh now builds a PKCS12 keystore with openssl (no JDK/keytool),
  and signing.gradle declares storeType PKCS12.
- Runner is meant to run on a roomy server (the app host lacks disk for the
  Android SDK); added runner/README.md with deployment steps. Removed the
  runner that was registered on the app host.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hank 2026-07-08 04:16:37 +00:00
parent d293e53ee6
commit 994aaa88d1
4 changed files with 68 additions and 17 deletions

View file

@ -174,17 +174,16 @@ On success the buyer receives the QR email. Re-sends of the same submission are
## APK builds (Forgejo CI)
The runner in `runner/` is registered against `git.mowden.top` and builds a signed APK whenever a `vX.Y.Z` tag is pushed.
A Forgejo Actions runner builds a signed APK whenever a `vX.Y.Z` tag is pushed. **Run the runner on the roomy server, not the app host** — the Android SDK needs several GB the app host doesn't have. See [`runner/README.md`](./runner/README.md) for deploying it.
**One-time setup:**
1. Generate a release keystore and print the secrets: `bash scripts/gen-keystore.sh`
1. Generate a release keystore (PKCS12, uses openssl — no JDK needed) and print the secrets: `bash scripts/gen-keystore.sh`
2. In Forgejo → CampgroundTickets → *Settings → Actions → Secrets*, add:
`ANDROID_KEYSTORE_B64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`, `ANDROID_KEY_PASSWORD`.
`ANDROID_KEYSTORE_B64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`, `ANDROID_KEY_PASSWORD`
(for PKCS12 the keystore and key passwords are the same value).
3. Keep the keystore file safe forever — Obtainium updates require the same signing key on every release.
**Release:** `git tag v0.1.0 && git push origin v0.1.0` → the workflow builds `camp-scan-v0.1.0.apk` and attaches it to the Forgejo release. Obtainium picks it up (see INSTALL.md).
The runner runs jobs in a `node:22-bookworm` container and installs the Android SDK itself. To (re)start it: `cd runner && cp .env.example .env` (set `REGISTRATION_TOKEN`, `DOCKER_GID`) `&& docker compose up -d`.
**Release:** `git tag v0.1.0 && git push origin v0.1.0` → the workflow builds `camp-scan-v0.1.0.apk` and attaches it to the Forgejo release. Obtainium picks it up (see INSTALL.md). The build runs jobs in a `node:22-bookworm` container and installs the Android SDK itself; the first run may need an SDK/Gradle tweak, so shake it out with a throwaway `v0.0.1` tag first.
## API reference (staff endpoints require `Authorization: Bearer <token>`)