ci: build and push static download site Docker image on master
Asteria Qt CI / rebuild-images (linux-arm64) (push) Skipped
Asteria Qt CI / rebuild-images (linux-x86_64) (push) Skipped
Asteria Qt CI / rebuild-images (windows-arm64) (push) Skipped
Asteria Qt CI / rebuild-images (windows-x86_64) (push) Skipped
Asteria Qt CI / build-macos (push) Successful in 10s
Asteria Qt CI / test-macos (push) Successful in 39s
Asteria Qt CI / rebuild-images (linux-arm64) (pull_request) Skipped
Asteria Qt CI / rebuild-images (linux-x86_64) (pull_request) Skipped
Asteria Qt CI / rebuild-images (windows-arm64) (pull_request) Skipped
Asteria Qt CI / rebuild-images (windows-x86_64) (pull_request) Skipped
Asteria Qt CI / build-linux (push) Successful in 1m12s
Asteria Qt CI / build-linux (pull_request) Canceled after 0s
Asteria Qt CI / build-linux-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / build-windows (pull_request) Canceled after 0s
Asteria Qt CI / build-windows-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / build-macos (pull_request) Canceled after 0s
Asteria Qt CI / test-linux (pull_request) Canceled after 0s
Asteria Qt CI / test-macos (pull_request) Canceled after 0s
Asteria Qt CI / package-linux (pull_request) Canceled after 0s
Asteria Qt CI / package-linux-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / package-windows (pull_request) Canceled after 0s
Asteria Qt CI / package-windows-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / package-macos (pull_request) Canceled after 0s
Asteria Qt CI / release (pull_request) Canceled after 0s
Asteria Qt CI / build-site-image (pull_request) Canceled after 0s
Asteria Qt CI / package-windows (push) Successful in 23s
Asteria Qt CI / build-windows-arm64 (push) Successful in 1m29s
Asteria Qt CI / build-windows (push) Successful in 1m29s
Asteria Qt CI / build-linux-arm64 (push) Successful in 1m31s
Asteria Qt CI / package-windows-arm64 (push) Successful in 19s
Asteria Qt CI / package-macos (push) Successful in 56s
Asteria Qt CI / test-linux (push) Successful in 3m20s
Asteria Qt CI / package-linux-arm64 (push) Successful in 17s
Asteria Qt CI / package-linux (push) Successful in 17s
Asteria Qt CI / release (push) Skipped
Asteria Qt CI / build-site-image (push) Skipped

Instead of linking to ephemeral CI artifacts on a wiki, package each
master release's built binaries into a self-contained Nginx static site
container (`gitea.agel.dev/asteria/site:latest` and `:<version>`) via a
new `build-site-image` job in Gitea Actions.

Because the unprivileged `kaniko-builder` runner has no Node.js runtime
for artifact actions, the multi-stage `Dockerfile.site` fetches the
just-published `v<version>` release assets (permission-preserving Linux
`.AppImage.tar.gz` archives, Windows portable `.zip` packages, and
optional macOS `.dmg`) from the Gitea Release API inside a throwaway
Python builder stage and strips the temporary token file before copying
the static output into `nginx:1.27-alpine`.

HTML, CSS, and JS are kept as standalone static files under `site/`
with `{{PLACEHOLDER}}` tokens substituted by `generate-static-site.py`
alongside generated `manifest.json` and `downloads/SHA256SUMS`, allowing
the page layout and styling to be edited independently of the build
script.
This commit is contained in:
Agel committed 2026-11-23 20:10:35 +01:00
1 parent 9f82561098
commit 92f773aa8f
11 files changed
+953 -3

No files matched your search

+4 -2
View File
@@ -128,8 +128,9 @@ The CI environment is split into 4 build targets on `ubuntu:24.04` sharing a com
| `gitea.agel.dev/asteria/build-linux-arm64:latest` | `linux-arm64` (`Dockerfile.build`) | `linux-arm64:host` | `build-linux-arm64`, `package-linux-arm64` |
| `gitea.agel.dev/asteria/build-windows-x86_64:latest` | `windows-x86_64` (`Dockerfile.build`) | `windows-x86_64:host` | `build-windows`, `package-windows` |
| `gitea.agel.dev/asteria/build-windows-arm64:latest` | `windows-arm64` (`Dockerfile.build`) | `windows-arm64:host` | `build-windows-arm64`, `package-windows-arm64` |
| `gitea.agel.dev/asteria/build-kaniko:latest` | `Dockerfile.kaniko` | `kaniko-builder:host` | `rebuild-images` (`workflow_dispatch`, unprivileged) |
Each container runs `docker/entrypoint.sh` (or `docker/kaniko-entrypoint.sh`), which auto-registers with Gitea (`GITEA_INSTANCE_URL`, `GITEA_RUNNER_REGISTRATION_TOKEN`, `GITEA_RUNNER_NAME`, `GITEA_RUNNER_LABELS`) on first boot when `/data/.runner` is absent, generates `/data/config.yaml`, and starts `act_runner daemon`. In `.gitea/workflows/ci.yml`, `workflow_dispatch` (`rebuild_images=true`) runs on `kaniko-builder` to rebuild and push all 4 `Dockerfile.build` images to `gitea.agel.dev/asteria` using `BUILD_TOKEN` with zero extra capabilities, zero `security_opt`, and no Docker socket.
| `gitea.agel.dev/asteria/build-kaniko:latest` | `Dockerfile.kaniko` | `kaniko-builder:host` | `rebuild-images` (`workflow_dispatch`, unprivileged), `build-site-image` (`master` only) |
| `gitea.agel.dev/asteria/site:latest` | `Dockerfile.site` | — (served runtime) | Static Nginx download website bundling built release binaries (`:latest` & `:<version>`) |
Each container runs `docker/entrypoint.sh` (or `docker/kaniko-entrypoint.sh`), which auto-registers with Gitea (`GITEA_INSTANCE_URL`, `GITEA_RUNNER_REGISTRATION_TOKEN`, `GITEA_RUNNER_NAME`, `GITEA_RUNNER_LABELS`) on first boot when `/data/.runner` is absent, generates `/data/config.yaml`, and starts `act_runner daemon`. In `.gitea/workflows/ci.yml`, `workflow_dispatch` (`rebuild_images=true`) runs on `kaniko-builder` to rebuild and push all 4 `Dockerfile.build` images to `gitea.agel.dev/asteria` using `BUILD_TOKEN` with zero extra capabilities, zero `security_opt`, and no Docker socket. After `release` on `master`, `build-site-image` also runs on `kaniko-builder` using `docker/Dockerfile.site` and `scripts/generate-static-site.py` to build and push `gitea.agel.dev/asteria/site:latest` and `:${ASTERIA_VERSION}`.
### macOS Build Environment
```bash
@@ -167,6 +168,7 @@ scripts/start-runner-macos.sh
1. Creates release tag `vX.Y.Z` and a Gitea Release at `GITHUB_SHA` via `/api/v1/repos/Asteria/asteria-qt/releases` (if absent).
2. Uploads packaged binaries (`Asteria-x86_64.AppImage.tar.gz`, `Asteria-arm64.AppImage.tar.gz`, `asteria-qt-windows-x86_64.zip`, `asteria-qt-windows-arm64.zip`, and `Asteria.dmg` when the optional `macos-qt` runner is active) as release assets.
3. Increments `PATCH` in `VERSION` (`X.Y.(Z+1)`), committing `chore: bump version to ... [skip ci]` on `master` via the Gitea Contents API (`PUT /api/v1/repos/Asteria/asteria-qt/contents/VERSION`). Tag pushes do not trigger `push` branch workflows.
- Following `release`, `build-site-image` runs on `kaniko-builder` (using `docker/Dockerfile.site`, `docker/nginx.conf`, `site/` static templates, and `scripts/generate-static-site.py`) to fetch the `vX.Y.Z` release assets, render the static download portal (`index.html`, `styles.css`, `app.js`, `manifest.json`, `downloads/SHA256SUMS`), and push `gitea.agel.dev/asteria/site:latest` and `gitea.agel.dev/asteria/site:X.Y.Z`.
### VS Code & CMake Presets
Pre-configured tasks, launch configurations, and CMake presets are available: