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.

Mirror to GitLab from GitHub Actions; docs: GitHub is home, GitLab the mirror

Duarte Santos38a0b52e36a7
diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml
new file mode 100644
index 000000000..b93eca4ea
--- /dev/null
+++ b/.github/workflows/mirror.yml
@@ -0,0 +1,59 @@
+# Keeps the GitLab copy identical to this repository, so nobody has to push twice.
+#
+# GitHub is the home of openGym; gitlab.com/DuarteSantos8/opengym is a mirror that stays
+# because its CI builds the release artefacts (signed APK, multi-arch images, SBOMs) and
+# nothing there is merged by hand. Every push to main and every v* tag is forwarded here.
+# Pull mirroring on gitlab.com is a paid feature, so the push runs from this side.
+#
+# Only fast-forward pushes: a rewrite on main, or a commit that landed on GitLab directly,
+# makes this job fail loudly instead of overwriting anything. Branches are never deleted
+# on the mirror from here.
+#
+# Needs one secret, GITLAB_MIRROR_TOKEN: a *project* access token of the GitLab project
+# (Settings → Access tokens) with the single scope `write_repository` and the Maintainer
+# role — main and v* are protected there and only Maintainers may push them. It has no
+# api scope, so a leak could push commits but not read variables, tokens or the registry.
+name: Mirror to GitLab
+
+on:
+ push:
+ branches: [main]
+ tags: ['v*']
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+# One mirror push at a time, in order; never cancel a running one.
+concurrency:
+ group: mirror-to-gitlab
+ cancel-in-progress: false
+
+jobs:
+ mirror:
+ # Forks have neither the secret nor a mirror to push to.
+ if: github.repository == 'DuarteSantos8/openGym'
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+ persist-credentials: false
+
+ - name: Push main and the v* tags to GitLab
+ env:
+ GITLAB_MIRROR_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}
+ run: |
+ if [ -z "$GITLAB_MIRROR_TOKEN" ]; then
+ echo "::error::GITLAB_MIRROR_TOKEN is not set — add the GitLab project token as a repository secret."
+ exit 1
+ fi
+ # The token goes in through a credential helper, never on the command line or into
+ # .git/config, so it shows up in no process list and no log line.
+ git config credential.helper '!f() { echo "username=oauth2"; echo "password=$GITLAB_MIRROR_TOKEN"; }; f'
+ # main first, then the tags: a tag pipeline on GitLab checks that its commit is on
+ # main, so the branch has to be there before the tag arrives.
+ git push https://gitlab.com/DuarteSantos8/opengym.git refs/remotes/origin/main:refs/heads/main
+ git push https://gitlab.com/DuarteSantos8/opengym.git 'refs/tags/v*:refs/tags/v*'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4b9e4bd5..009c02bc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,10 +52,13 @@ see why. Web bundle and APK; the API image only for the payload change.
list — speech, embeddings, image models, realtime and Responses-only variants — made it easy to
pick one Chat Completions refuses with a 400 or a 404. Compatible endpoints (Ollama, LM Studio,
OpenRouter) stay unfiltered. The Gemini key field also names the new `AQ.` key prefix.
-- 🏠 **openGym is back on GitHub.** The account suspension that took `github.com/DuarteSantos8/openGym`
- offline on 2026-08-19 is lifted. Everything that happened on GitLab in the meantime is there
- again: history, tags, the releases v1.2.9 to v1.3.5 with their APKs, the GHCR images and the
- GitHub Pages demo. GitLab stays as it is — both are read, both get every release.
+- 🏠 **openGym is back on GitHub, and GitHub is home again.** The account suspension that took
+ `github.com/DuarteSantos8/openGym` offline on 2026-08-19 is lifted. Everything that happened on
+ GitLab in the meantime is there again: history, tags, the releases v1.2.9 to v1.3.5 with their
+ APKs, the GHCR images and the GitHub Pages demo. GitLab is now a mirror, pushed by a GitHub
+ Actions workflow on every push to `main` and every `v*` tag; it keeps running the CI that builds
+ the signed APK and the images. Issues and pull requests go to GitHub; the merge requests still
+ open on GitLab are reviewed and land on `main` from there. The site follows suit.
## v1.3.5 — 2026-09-06
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2d6db4735..164e25b62 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -43,11 +43,14 @@ cd frontend && npm test
rules are easy to get subtly wrong and nearly impossible to verify by clicking — the
progression engine grew two real bugs that only a test pinned down.
-## What CI does with your merge request
+## What CI does with your pull request
-A pull request on GitHub runs the three test suites (frontend, MCP, api) through GitHub Actions;
-the image builds and the APK come from GitLab CI, so a change that needs those is easiest to
-test as a merge request there. Every MR runs the three test suites (frontend, MCP, api), with the results and the coverage
+A pull request runs the three test suites (frontend, MCP, api) through GitHub Actions and
+builds and boots both api image targets. The APK and the published images come from the CI
+on the GitLab mirror, which builds them from `main` after the merge; if your change needs an
+APK to be judged, say so in the PR and a maintainer runs that build.
+
+Merge requests that are still open on the GitLab mirror keep working as before. Every MR runs the three test suites (frontend, MCP, api), with the results and the coverage
of your diff shown in the MR itself, plus a build of the web image and the api image when you
touched their inputs. The frontend job also prints how much your change adds to the gzipped
bundle compared with main. The APK and the published images are manual jobs there (on
@@ -73,13 +76,12 @@ here before, otherwise a maintainer presses "Run pipeline" after a first look at
| You have | Goes to |
| --- | --- |
| A quick question, or you'd rather just chat | [The Discord](https://discord.gg/e62jY6fwVb) |
-| A question, or self-hosting that won't behave | An issue labelled `question` — [GitHub](https://github.com/DuarteSantos8/openGym/issues) or [GitLab](https://gitlab.com/DuarteSantos8/opengym/-/issues) |
-| An idea you're not sure about yet | An issue labelled `idea` — [GitHub](https://github.com/DuarteSantos8/openGym/issues) or [GitLab](https://gitlab.com/DuarteSantos8/opengym/-/issues) |
-| A reproducible bug | Issues — [GitHub](https://github.com/DuarteSantos8/openGym/issues) or [GitLab](https://gitlab.com/DuarteSantos8/opengym/-/issues) |
-| A change you've already built | A pull request on GitHub or a merge request on GitLab — both are read |
+| A question, or self-hosting that won't behave | [An issue labelled `question`](https://github.com/DuarteSantos8/openGym/issues) |
+| An idea you're not sure about yet | [An issue labelled `idea`](https://github.com/DuarteSantos8/openGym/issues) |
+| A reproducible bug | [Issues](https://github.com/DuarteSantos8/openGym/issues) |
+| A change you've already built | [A pull request](https://github.com/DuarteSantos8/openGym/pulls) |
-Questions and ideas are issues too (GitLab has no Discussions, and one tracker per platform is
-enough) — just labelled, so nobody
+Questions and ideas are issues too (one tracker is enough) — just labelled, so nobody
mistakes a question for agreed-on work. An answered question is worth more than the same answer
in a chat log: the next person searching "passkey login fails behind my reverse proxy" finds it.
That is the one thing the Discord can't do, so if an answer there turns out to be worth keeping,
diff --git a/README.md b/README.md
index c4cfaff48..32d68978f 100644
--- a/README.md
+++ b/README.md
@@ -21,12 +21,12 @@ No account on someone else's server, no subscription, no ads. Just `docker compo
<br>
[![Pipeline](https://gitlab.com/DuarteSantos8/opengym/badges/main/pipeline.svg?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/pipelines)
[![Coverage](https://gitlab.com/DuarteSantos8/opengym/badges/main/coverage.svg?job=test:frontend&style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/pipelines?ref=main)
-[![Release](https://gitlab.com/DuarteSantos8/opengym/-/badges/release.svg?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/releases)
-![Last commit](https://img.shields.io/gitlab/last-commit/DuarteSantos8%2Fopengym?style=flat-square)
-[![Stars](https://img.shields.io/gitlab/stars/DuarteSantos8%2Fopengym?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/starrers)
+[![Release](https://img.shields.io/github/v/release/DuarteSantos8/openGym?style=flat-square)](https://github.com/DuarteSantos8/openGym/releases)
+![Last commit](https://img.shields.io/github/last-commit/DuarteSantos8/openGym?style=flat-square)
[![GitHub stars](https://img.shields.io/github/stars/DuarteSantos8/openGym?style=flat-square&logo=github&logoColor=white)](https://github.com/DuarteSantos8/openGym/stargazers)
+[![Issues](https://img.shields.io/github/issues/DuarteSantos8/openGym?style=flat-square)](https://github.com/DuarteSantos8/openGym/issues)
[![Tests](https://github.com/DuarteSantos8/openGym/actions/workflows/test.yml/badge.svg)](https://github.com/DuarteSantos8/openGym/actions/workflows/test.yml)
-[![Issues](https://img.shields.io/gitlab/issues/open/DuarteSantos8%2Fopengym?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/issues)
+[![Mirror](https://github.com/DuarteSantos8/openGym/actions/workflows/mirror.yml/badge.svg)](https://github.com/DuarteSantos8/openGym/actions/workflows/mirror.yml)
[![Discord](https://img.shields.io/badge/Discord-join-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/e62jY6fwVb)
[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-support-FFDD00?style=flat-square&logo=buymeacoffee&logoColor=black)](https://buymeacoffee.com/duartesantos)
@@ -46,7 +46,7 @@ No account on someone else's server, no subscription, no ads. Just `docker compo
<div align="center">
-### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) · [📦 Source on GitHub](https://github.com/DuarteSantos8/openGym) · [🦊 GitLab](https://gitlab.com/DuarteSantos8/opengym)
+### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) · [📦 Source on GitHub](https://github.com/DuarteSantos8/openGym) · [🦊 GitLab mirror](https://gitlab.com/DuarteSantos8/opengym)
Screenshots, docs and the APK download live on the site.<br>
<sub>Want to poke at it first? The <a href="https://opengym.duarte-santos.ch/demo/">in-browser
@@ -112,7 +112,7 @@ as a home-screen app, passkey sign-in, offline support, sync across your phone a
You need [Docker](https://docs.docker.com/get-docker/) with Compose.
```bash
-git clone https://github.com/DuarteSantos8/openGym # or https://gitlab.com/DuarteSantos8/opengym — same repo
+git clone https://github.com/DuarteSantos8/openGym
cd openGym
cp .env.example .env
docker compose pull # grab prebuilt images (amd64 + arm64) — skip to build from source instead
@@ -214,13 +214,11 @@ host side of that volume, not the variable.
## Roadmap
-The plan lives in [ROADMAP.md](ROADMAP.md) and on the
-[GitLab milestones](https://gitlab.com/DuarteSantos8/opengym/-/milestones): v1.3.5 programmes and
+The plan lives in [ROADMAP.md](ROADMAP.md) (the
+[GitLab milestones](https://gitlab.com/DuarteSantos8/opengym/-/milestones) track the same items): v1.3.5 programmes and
progression (explicit warm-up/work phases, AMRAP driver selection, multi-week programmes, adaptive
1RM), v1.3.6 accounts and sync (password and OIDC login, personal-trainer role, remote MCP), v1.3.7
-mobile (timer in the notification bar, widgets, Withings). Ideas and merge requests welcome — the
-[board](https://gitlab.com/DuarteSantos8/opengym/-/boards) shows what is planned, in progress and
-waiting for a test on the staging instance.
+mobile (timer in the notification bar, widgets, Withings). Ideas and pull requests welcome.
## Tech
@@ -250,25 +248,24 @@ in the Docker build.
- **[Discord](https://discord.gg/e62jY6fwVb)** — release announcements, self-hosting help and
the back-and-forth that would be a slow issue thread. Quickest way to get an answer.
-- **Issues** — on [GitHub](https://github.com/DuarteSantos8/openGym/issues) or
- [GitLab](https://gitlab.com/DuarteSantos8/opengym/-/issues), whichever you have an account on; both
- are read. Bugs, questions, self-hosting help and ideas all go there: label a question
+- **[Issues](https://github.com/DuarteSantos8/openGym/issues)** — bugs, questions, self-hosting
+ help and ideas. (Issues still open on the GitLab mirror are read too.) Label a question
`question` and an idea `idea`, and it gets treated as one rather than as agreed-on work. Use
an issue over the Discord for anything the next person should be able to find by searching.
- **Login trouble?** Most of it is an `RP_ID`/`ORIGIN` mismatch — check
[docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) before opening an issue.
-- **Pull / merge requests** — [on GitHub](https://github.com/DuarteSantos8/openGym/pulls) or
- [on GitLab](https://gitlab.com/DuarteSantos8/opengym/-/merge_requests); see
- [CONTRIBUTING.md](CONTRIBUTING.md).
-
-> **Two homes, one project.** `github.com/DuarteSantos8/openGym` was offline from 2026-08-19 to
-> 2026-09-10 while the account was suspended, and the project moved to GitLab in the meantime. The
-> account is back, and both repositories carry the same history, tags and releases: the container
-> images are published to GitLab's registry and to GHCR, the signed APK is attached to the release
-> on both sides. GitLab CI builds the release artefacts (images, APK, SBOMs); GitHub Actions runs the
-> tests, builds the GHCR images and publishes the in-browser demo to GitHub Pages.
-> (gitea.com/DuarteSantos/openGym is only a mirror.) In [CHANGELOG.md](CHANGELOG.md), `!NN` is
-> always a GitLab merge request; `#NN` refers to whichever tracker the report came through.
+- **[Pull requests](https://github.com/DuarteSantos8/openGym/pulls)** — see
+ [CONTRIBUTING.md](CONTRIBUTING.md). Merge requests already open on the GitLab mirror are still
+ reviewed and land on `main` here; new work, please, as a pull request.
+
+> **GitHub is home; GitLab is a mirror.** `github.com/DuarteSantos8/openGym` was offline from
+> 2026-08-19 to 2026-09-10 while the account was suspended, and the project lived on GitLab in the
+> meantime. It is back, and [gitlab.com/DuarteSantos8/opengym](https://gitlab.com/DuarteSantos8/opengym)
+> is now kept in sync by a GitHub Actions workflow on every push to `main` and every `v*` tag —
+> nothing is pushed or merged there by hand. The mirror stays because its CI builds the release
+> artefacts: the signed APK, the multi-arch images (GitLab registry, mirrored to GHCR) and the SBOMs.
+> (gitea.com/DuarteSantos/openGym is a plain mirror.) In [CHANGELOG.md](CHANGELOG.md), `!NN` is a
+> GitLab merge request from those weeks; `#NN` refers to whichever tracker the report came through.
## Contributing
@@ -279,9 +276,6 @@ openGym is free and stays free: AGPL, no subscription, no paid tier, nothing hel
sponsors. If it replaced a paid tracker for you and you want to chip in, there's a coffee button
below (and a badge at the top) — a star, a bug report or a merge request is worth just as much.
-<!-- GitLab has no Sponsor button the way GitHub's FUNDING.yml gives one, so the link stands
- on its own here as well. -->
-
<a href="https://buymeacoffee.com/duartesantos" target="_blank">
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"
alt="Buy Me A Coffee"
diff --git a/docs/MOBILE.md b/docs/MOBILE.md
index 32c475325..7ef63c3f5 100644
--- a/docs/MOBILE.md
+++ b/docs/MOBILE.md
@@ -91,10 +91,10 @@ The official signed APK is in four places, all the same file:
- **[GitLab's package registry](https://gitlab.com/DuarteSantos8/opengym/-/packages)** — every
build under `opengym-android/<version>/`, with a `.sha256` beside it. Direct link, no login:
`https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/<version>/openGym-<version>.apk`
-- **[The GitLab release](https://gitlab.com/DuarteSantos8/opengym/-/releases)** for that version,
- which links to the two above.
- **[The GitHub release](https://github.com/DuarteSantos8/openGym/releases)** for that version,
with the APK and its `.sha256` attached as release assets.
+- **[The GitLab release](https://gitlab.com/DuarteSantos8/opengym/-/releases)** on the mirror,
+ where the file is built; it links to the package registry above.
Android asks you to allow installs from the browser the first time — that's standard for any
app outside the Play Store. Check the `.sha256` if you got the file from anywhere else.