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

+1 -1
View File
@@ -1,6 +1,6 @@
# Multi-stage CI runner images for asteria-qt (all sharing the `base` layer).
# Targets:
# - linux-x86_64 : Native Linux x86_64 build, CTest, AppImage packaging, and wiki jobs
# - linux-x86_64 : Native Linux x86_64 build, CTest, AppImage packaging, and release jobs
# - linux-arm64 : Cross-compiled Linux ARM64 build and AppImage packaging
# - windows-x86_64 : Cross-compiled Windows x86_64 build and portable zip packaging
# - windows-arm64 : Cross-compiled Windows ARM64 build and portable zip packaging
+43
View File
@@ -0,0 +1,43 @@
# Multi-stage static website image serving built Asteria Qt release binaries.
# Target image: gitea.agel.dev/asteria/site:latest (and :<version>)
FROM python:3.12-alpine AS builder
ARG ASTERIA_VERSION=0.0.0
ARG CI_COMMIT_SHORT_SHA=unknown
ARG CI_COMMIT_REF_NAME=master
ARG CI_RUN_ID=0
ARG CI_RUN_URL=""
ARG CI_REPO_URL="https://gitea.agel.dev/Asteria/asteria-qt"
ARG GITEA_API_URL=""
ARG GITEA_REPO=""
WORKDIR /build
COPY scripts/generate-static-site.py /build/generate-static-site.py
COPY site/ /build/site/
COPY packaging/icons/128x128/asteria-qt.png /build/logo.png
COPY site-input/ /build/input/
RUN python3 /build/generate-static-site.py \
--input-dir /build/input \
--output-dir /site \
--template-dir /build/site \
--version "${ASTERIA_VERSION}" \
--commit-sha "${CI_COMMIT_SHORT_SHA}" \
--commit-branch "${CI_COMMIT_REF_NAME}" \
--run-id "${CI_RUN_ID}" \
--run-url "${CI_RUN_URL}" \
--repo-url "${CI_REPO_URL}" \
--gitea-api-url "${GITEA_API_URL}" \
--gitea-repo "${GITEA_REPO}" \
--gitea-token-file /build/input/.gitea_token \
--icon /build/logo.png \
--require-core && \
rm -f /build/input/.gitea_token
FROM nginx:1.27-alpine
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /site/ /usr/share/nginx/html/
EXPOSE 80
+37
View File
@@ -0,0 +1,37 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
sendfile on;
tcp_nopush on;
gzip on;
gzip_vary on;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/javascript text/html;
location = /healthz {
access_log off;
default_type text/plain;
return 200 "ok\n";
}
location /downloads/ {
add_header Content-Disposition "attachment";
add_header X-Content-Type-Options "nosniff";
expires 1h;
try_files $uri =404;
}
location = /manifest.json {
add_header Cache-Control "no-cache";
try_files $uri =404;
}
location / {
try_files $uri $uri/ =404;
}
}