Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

CI: SHA256 zum APK veroeffentlichen, Pages-URL richtigstellen

Duarte Santosf38036fab6d5
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cc1ed8e88..b159a2645 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -227,16 +227,23 @@ build:apk:
cd "$CI_PROJECT_DIR"
. ./apk.env
if [ -n "${CI_COMMIT_TAG:-}" ] && [ -f "openGym-$APK_VERSION.apk" ]; then
- curl --fail --silent --show-error \
- --header "JOB-TOKEN: $CI_JOB_TOKEN" \
- --upload-file "openGym-$APK_VERSION.apk" \
- "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/opengym-android/$APK_VERSION/openGym-$APK_VERSION.apk"
- echo "uploaded openGym-$APK_VERSION.apk to the generic package registry"
+ # Sideloading means nobody's app store checked this file for you, so publish the
+ # digest next to it rather than leaving people to trust the download.
+ sha256sum "openGym-$APK_VERSION.apk" > "openGym-$APK_VERSION.apk.sha256"
+ cat "openGym-$APK_VERSION.apk.sha256"
+ for f in "openGym-$APK_VERSION.apk" "openGym-$APK_VERSION.apk.sha256"; do
+ curl --fail --silent --show-error \
+ --header "JOB-TOKEN: $CI_JOB_TOKEN" \
+ --upload-file "$f" \
+ "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/opengym-android/$APK_VERSION/$f"
+ echo "uploaded $f to the generic package registry"
+ done
fi
artifacts:
name: "openGym-apk-$CI_COMMIT_REF_SLUG"
paths:
- "openGym-*.apk"
+ - "openGym-*.apk.sha256"
reports:
dotenv: apk.env
expire_in: 30 days
@@ -253,7 +260,9 @@ build:apk:
# ---------------------------------------------------------------------------- pages
-# The browser-only demo: https://duartesantos8.gitlab.io/opengym/
+# The browser-only demo: https://opengym-bc111a.gitlab.io/
+# (that opaque host is GitLab's "unique domain" for Pages, on by default; the tidier
+# https://duartesantos8.gitlab.io/opengym/ 308s to it. Settings → Pages turns it off.)
# Pages serves static files only, so this build has no backend — VITE_DEMO=1 makes the
# app boot straight into guest mode with a seeded example history (frontend/src/lib/demo.js).
# Vite's base is './', so the bundle drops into a subdirectory unchanged.
@@ -316,6 +325,9 @@ release:
- name: "openGym-$APK_VERSION.apk (Android, sideload)"
url: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/opengym-android/$APK_VERSION/openGym-$APK_VERSION.apk"
link_type: package
+ - name: "openGym-$APK_VERSION.apk.sha256 (checksum)"
+ url: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/opengym-android/$APK_VERSION/openGym-$APK_VERSION.apk.sha256"
+ link_type: other
- name: "Container images (api + web)"
url: "$CI_PROJECT_URL/container_registry"
link_type: image
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2cf9b260..6fa7f7075 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -60,8 +60,9 @@ since the GitHub account went.
the fatigue probe and the MCP suite all run on GitLab CI. The GitHub Actions workflows stay
in `.github/` for the day that account comes back.
- 🌐 The in-browser demo also builds to GitLab Pages
- (<https://duartesantos8.gitlab.io/opengym/>); <https://opengym.duarte-santos.ch/demo/>
- remains the copy the landing page embeds.
+ (<https://opengym-bc111a.gitlab.io/>, which <https://duartesantos8.gitlab.io/opengym/>
+ redirects to); <https://opengym.duarte-santos.ch/demo/> remains the copy the landing page
+ embeds.
- 📄 Security reports have a private channel again: a **confidential issue** on GitLab. See
`SECURITY.md`.
diff --git a/website/index.html b/website/index.html
index 71933768b..960bc1400 100644
--- a/website/index.html
+++ b/website/index.html
@@ -163,6 +163,9 @@
</ul>
<a class="btn" href="openGym.apk" download>Download for Android</a>
<p class="meta">v1.2.8 · 4.3 MB · Android 6.0+ · signed APK, sideload (your browser will ask — that's normal outside the Play Store)</p>
+ <p class="meta">Every release is also built and signed by CI and attached to the
+ <a href="https://gitlab.com/DuarteSantos8/opengym/-/releases" rel="noopener">GitLab
+ releases page</a>, checksums and all.</p>
<p class="meta"><b>iPhone?</b> Apple doesn't allow installs outside the App Store — use the
self-hosted version as a home-screen app instead, or see <a href="docs.html#iphone">the docs</a>.</p>
</div>