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.
44 lines
1.3 KiB
Docker
44 lines
1.3 KiB
Docker
# 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
|