docs: runner setup done (Forgejo Actions, VDS runner, ci.yml); desktop.yml without verbose bundling

This commit is contained in:
CRTkafa 2026-10-11 06:15:00 +08:00
parent 6c91aad0e1
commit 0b52c4ab40
2 changed files with 21 additions and 22 deletions

View file

@ -73,7 +73,7 @@ jobs:
apps/desktop/src-tauri/binaries/storebound-x86_64-unknown-linux-gnu version apps/desktop/src-tauri/binaries/storebound-x86_64-unknown-linux-gnu version
- name: Build AppImage and deb (path-free) - name: Build AppImage and deb (path-free)
working-directory: apps/desktop working-directory: apps/desktop
run: bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci --verbose run: bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci
- name: Self-test the exact artifacts - name: Self-test the exact artifacts
run: | run: |
V=$(bun tools/desktop-version.ts --print) V=$(bun tools/desktop-version.ts --print)

View file

@ -157,29 +157,28 @@ bun tools/desktop-release.ts add --out ~/.storebound-releases/desktop/0.1.0 \
It scans and signs each file, renames the unsigned Windows installer to `-unsigned`, and updates latest.json It scans and signs each file, renames the unsigned Windows installer to `-unsigned`, and updates latest.json
(`windows-x86_64`, `linux-x86_64`) and SHA256SUMS. For the scan, install `squashfs` and `sevenzip` from Homebrew. (`windows-x86_64`, `linux-x86_64`) and SHA256SUMS. For the scan, install `squashfs` and `sevenzip` from Homebrew.
### Runner setup (not done yet) ### Runner setup
Forgejo runs in Docker on the VDS; Actions is off (`[actions] ENABLED = false` in its app.ini). Forgejo runs in Docker on the VDS. `.forgejo/workflows/ci.yml` (`bun run ci`, Rust tests and clippy included) runs on
every push and pull request to main; `desktop.yml` as above. Neither publishes anything (Jenkins still publishes
site/). Workflow artifacts of this public repository can be downloaded by anyone for 14 days.
1. **Enable Actions in Forgejo.** In `app.ini`, set `[actions] ENABLED = true` and 1. **Actions in Forgejo (done).** `FORGEJO__actions__ENABLED=true` and
`DEFAULT_ACTIONS_URL = https://data.forgejo.org`. Restart the forgejo container, then enable Actions in the `FORGEJO__actions__DEFAULT_ACTIONS_URL=https://data.forgejo.org` in the compose file; the Actions unit is on for
repository settings. CRT/storebound only.
2. **Linux runner on the VDS, in Docker.** 2. **Linux runner on the VDS (done).** `/srv/forgejo-runner/`: Forgejo runner 13 (`vds-linux`, registered to
- Get a registration token: Site administration > Actions > Runners > Create new runner. CRT/storebound only, label `ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04`, capacity 2, job timeout
- Register and run: 2 h) next to its own Docker daemon (`docker:29-dind`, TLS only, 16 CPUs / 24 GB). Jobs run in throwaway containers
of that daemon: no Docker socket, no host volumes, nothing of Forgejo's data. The runner never sees a signing key.
```sh `actions/cache` uses the runner's cache server. `prune.sh` (cron, daily) removes stopped containers, dangling
mkdir -p /srv/forgejo-runner && cd /srv/forgejo-runner images and cache entries unused for 14 days, and caps images at 40 GB and the cache at 20 GB.
docker run --rm -v $PWD:/data code.forgejo.org/forgejo/runner:6 forgejo-runner generate-config > config.yml - Re-register (a new token from the repository's Actions runner settings):
# in config.yml: runner.labels: ["ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04"], `forgejo-runner register --no-interactive --instance https://git.crt.fyi --token <token> --name vds-linux`
# runner.capacity: 1, container.network: bridge, no privileged mode, no docker socket in jobs in the runner image with `/srv/forgejo-runner/data` as `/data`, then `docker compose up -d`.
docker run --rm -it -v $PWD:/data code.forgejo.org/forgejo/runner:6 forgejo-runner register \ - Linux quirks the workflow handles: `NO_STRIP=1` (strip removes the bun sidecar's payload) and the sidecar's rpath
--no-interactive --instance https://git.crt.fyi --token <token> --name vds-linux --labels ubuntu-22.04 set before bundling (linuxdeploy's own patchelf corrupts the bun executable; with the rpath already set it
``` leaves the file alone). The self-tests start the sidecar from the AppImage and the .deb, so a broken sidecar
fails the job.
- Run it as a service: the `forgejo-runner daemon` container with `/data` and the Docker socket, restart
unless-stopped.
- Jobs run in throwaway containers. The runner never sees a signing key.
3. **Windows runner (later).** The owner has no Windows machine yet. On one (Windows 10/11 x64): 3. **Windows runner (later).** The owner has no Windows machine yet. On one (Windows 10/11 x64):
- install Rust (MSVC, with the Visual Studio Build Tools), Bun and 7-Zip; - install Rust (MSVC, with the Visual Studio Build Tools), Bun and 7-Zip;
- run `forgejo-runner register --labels windows:host`, then `forgejo-runner daemon` as a service. - run `forgejo-runner register --labels windows:host`, then `forgejo-runner daemon` as a service.