No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Claude d75004a4f7
All checks were successful
Publish Jellium Flatpak / publish (push) Successful in 2m2s
feat: publish upstream's nightly with a Wayland launcher instead of building
Upstream's CI already builds a Flatpak bundle for every commit on main.
Take that, replace /app/bin/jellium-desktop with a launcher that points
WAYLAND_DISPLAY at /run/flatpak/$WAYLAND_DISPLAY (the app's Wayland
proxy overwrites flatpak's xdg-run symlink and leaves a dead socket, so
every launch after the first hangs), sign and publish.

JELLIUM_SOURCE_ID (bundle + launcher hashes) is published alongside;
a run whose content is already live skips signing and pushing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 14:36:33 -04:00
.forgejo/workflows feat: publish upstream's nightly with a Wayland launcher instead of building 2026-10-24 14:36:33 -04:00
flatpak feat: publish upstream's nightly with a Wayland launcher instead of building 2026-10-24 14:36:33 -04:00
README.md feat: publish upstream's nightly with a Wayland launcher instead of building 2026-10-24 14:36:33 -04:00

Jellium Flatpak builder

This Forgejo repository publishes the upstream Jellium Desktop Flatpak to the shared OSTree repository on the pages branch of gmatte/flatpak. It does not compile anything. Upstream's own CI builds a Flatpak bundle on every push to main (the "non-Flathub bundle" nightly in their README). This workflow:

  1. downloads that nightly and checks that it was built from the commit the mirror gmatte/jellium-desktop points to;
  2. replaces /app/bin/jellium-desktop with flatpak/jellium-desktop-launcher.sh (see Wayland launcher below);
  3. signs it, merges it into the existing repository (other apps' refs are kept), and force-pushes the result to pages.

Wayland launcher

Upstream's flatpak hangs on every launch after the first one under Wayland. Its Wayland proxy claims the first free wayland-N name in $XDG_RUNTIME_DIR. Inside the sandbox that is the app's persistent xdg-run directory, where wayland-N is flatpak's symlink to the compositor. The proxy replaces that symlink with its own socket and leaves the socket behind on exit, even a clean one. On the next launch flatpak cannot recreate the link (F: …/xdg-run/wayland-1 is not a symlink to "../../flatpak/wayland-1" as expected), the app connects to the dead socket, and it freezes. It recovers only after a logout or reboot clears /run/user, and reinstalling does not help.

The launcher points WAYLAND_DISPLAY at /run/flatpak/$WAYLAND_DISPLAY, the compositor socket flatpak always provides, then runs the real binary. Drop it once upstream fixes the proxy.

Publishing only new content

Each publish writes JELLIUM_SOURCE_ID next to the repository: the SHA-256 of the nightly bundle plus the SHA-256 of the launcher. A run whose ID matches the published one stops before signing or pushing anything, so the same build is never published twice. Run workflow with force publishes anyway. JELLIUM_UPSTREAM_REVISION records the upstream commit.

Configure Forgejo before running

Add these Actions secrets to this repository:

  • FLATPAK_GPG_PRIVATE_KEY — contents of the dedicated GPG private-key file.
  • FLATPAK_GPG_KEY_ID — D0E42090A407A10DE3CF99A0DF1B3BB7B059BD43.
  • FLATPAK_DEPLOY_KEY — contents of the dedicated SSH private-key file.

Add the matching SSH public key as a write-enabled deploy key on gmatte/flatpak:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDOyw03DmvHTOPxpuzY4CpcRfUj/9TTC8p7a4ZHK4vCx gmatte-flatpak-pages-publish

In Forgejo, enable this on gmatte/flatpak under Settings → Deploy Keys. The publisher push fails if the key is registered without Write access.

The workflow pins Forgejo's existing SSH host key and publishes only to the pages branch. Do not expose these secrets to pull-request workflows. It runs on the repository-scoped flatpak runner. Repacking needs no build namespaces, so that runner's extra permissions are a leftover from when this repository compiled the app.

Register a repository-level Actions runner for this repository and install its registration token as the forgejo-jellium-runner-secret Kubernetes Secret in namespace forgejo, with key registration-token. Do not use the instance-wide runner token: this runner has extra container permissions and must remain restricted to this builder repository.

Run a publish

Nothing polls. A run starts:

  • When the mirror's main moves. A webhook on the mirror dispatches the workflow (below). The mirror syncs every 8h, and Synchronize now on the mirror starts a run right away. If upstream's build for that commit has not finished, the run fails with a message saying so; run it again later.
  • On push to this repository's main.
  • Manually with Publish Jellium Flatpak → Run workflow.

The flatpak-pages Kubernetes deployment serves the published branch.

Mirror webhook

On gmatte/jellium-desktop → Settings → Webhooks → Add webhook → Forgejo:

  • Target URL: https://forgejo.gmatte.xyz/api/v1/repos/gmatte/jellium-flatpak-builder/actions/workflows/build.yml/dispatches
  • HTTP method POST, content type application/json
  • Trigger on: Push events only, branch filter main
  • Authorization header: token <TOKEN>, a token with write:repository that can write to this repository

A mirror sync that brings new commits fires a push event. Its payload carries "ref": "refs/heads/main" at the top level, which the dispatch API reads as the ref to run this workflow on. The other fields are ignored, and force defaults to false.

Local installation

Once the remote is live, add it and install the app:

flatpak remote-add --user --from gmatte \
  https://flatpak.pages.forgejo.gmatte.xyz/gmatte.flatpakrepo
flatpak install --user gmatte net.nullsum.JelliumDesktop