ci: rust job through the builder image, worker test stage and runtime start, nightly advisories, manual digest-tagged release-images workflow; CSP proof script
This commit is contained in:
1 parent
3970cdca52
commit
4833fd29ef
7 files changed
+131
-1
No files matched your search
+27
-1
@@ -1,6 +1,10 @@
|
||||
# Gitea Actions (same syntax as GitHub Actions). Runs on the self-hosted forge
|
||||
# runner; no external provider. The check job covers the SQL layer through the
|
||||
# PGlite harness (no Docker); the supabase job replays it on the real stack.
|
||||
#
|
||||
# Rust (plan R0, docs/development/RUST.md): every cargo command runs inside the
|
||||
# reference builder image built from docker/rust-builder.Dockerfile, so CI and a
|
||||
# developer machine use the same toolchain and the production VPS never needs Rust.
|
||||
name: ci
|
||||
|
||||
on:
|
||||
@@ -9,8 +13,22 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
rust:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Reference Rust builder image (runner needs a Docker daemon)
|
||||
run: docker build -f docker/rust-builder.Dockerfile -t faunosteo_rust_builder:1.99.0 docker
|
||||
- name: fmt, clippy, tests, ts-rs export, cargo-deny (licenses, bans, sources)
|
||||
run: bash docker/rust-run.sh bash docker/rust-check.sh
|
||||
- name: Committed TypeScript types match the Rust contracts
|
||||
run: git diff --exit-code -- packages/core-wasm/types
|
||||
- name: Browser module builds (size printed; the budget is asserted by the vitest proofs)
|
||||
run: bash docker/rust-run.sh bash docker/wasm-build.sh
|
||||
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
needs: rust
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
@@ -19,6 +37,8 @@ jobs:
|
||||
- name: Activate pnpm (version from package.json "packageManager")
|
||||
run: corepack enable && corepack prepare --activate
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: Browser module for the core-wasm proofs (same builder image as the rust job)
|
||||
run: docker build -f docker/rust-builder.Dockerfile -t faunosteo_rust_builder:1.99.0 docker && bash docker/rust-run.sh bash docker/wasm-build.sh
|
||||
- run: pnpm typecheck
|
||||
- run: pnpm test:run
|
||||
- run: pnpm lint
|
||||
@@ -29,8 +49,14 @@ jobs:
|
||||
needs: check
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Docker image builds (runner needs a Docker daemon)
|
||||
- name: Application image builds (runner needs a Docker daemon)
|
||||
run: docker build -t faunosteo:ci .
|
||||
- name: Worker sandbox tests and seccomp derivation on the musl binary that ships
|
||||
run: docker build -f crates/worker/Dockerfile --target test -t faunosteo_worker:test .
|
||||
- name: Worker runtime image builds and starts (configuration check, no job loop before R1)
|
||||
run: |
|
||||
docker build -f crates/worker/Dockerfile -t faunosteo_worker:ci .
|
||||
docker run --rm --read-only --cap-drop ALL --security-opt no-new-privileges:true faunosteo_worker:ci run --check
|
||||
|
||||
supabase:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Production images, built in CI and identified by digest (D-R13, owner amendment of
|
||||
# 2026-10-12): the VPS pulls them and never compiles. Manual only (workflow_dispatch), never
|
||||
# on push: no publication or promotion of a production image without an explicit run and
|
||||
# a validation. Nothing here deploys; DEPLOY.md "Image deploy (prepared)" is the runbook.
|
||||
#
|
||||
# Secrets expected on the forge: REGISTRY (host, e.g. the Gitea container registry of this
|
||||
# forge), REGISTRY_USER, REGISTRY_TOKEN (write:package scope). Images are pushed as
|
||||
# <registry>/<namespace>/faunosteo_app:<sha> and faunosteo_worker:<sha>; the digests are
|
||||
# printed in the job summary and are what the VPS pins.
|
||||
name: release-images
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
sheet_bundle:
|
||||
description: 'SHEET_BUNDLE for the app image (none = production default, draft = preview)'
|
||||
required: false
|
||||
default: 'none'
|
||||
|
||||
jobs:
|
||||
images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Registry login
|
||||
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ secrets.REGISTRY }}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||
- name: Build and push the application image
|
||||
run: |
|
||||
image="${{ secrets.REGISTRY }}/${{ github.repository_owner }}/faunosteo_app:${{ github.sha }}"
|
||||
docker build --build-arg SHEET_BUNDLE="${{ github.event.inputs.sheet_bundle }}" -t "$image" .
|
||||
docker push "$image"
|
||||
echo "app: $(docker inspect --format='{{index .RepoDigests 0}}' "$image")" >> "$GITHUB_STEP_SUMMARY"
|
||||
- name: Build and push the worker image
|
||||
run: |
|
||||
image="${{ secrets.REGISTRY }}/${{ github.repository_owner }}/faunosteo_worker:${{ github.sha }}"
|
||||
docker build -f crates/worker/Dockerfile -t "$image" .
|
||||
docker push "$image"
|
||||
echo "worker: $(docker inspect --format='{{index .RepoDigests 0}}' "$image")" >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -0,0 +1,17 @@
|
||||
# RustSec advisories, out of the blocking path on purpose (RUST_ARCHITECTURE_REVIEW VIII.3):
|
||||
# an advisory published for an unrelated crate must not redden every branch. The run is
|
||||
# nightly and manual; the release gate (Step 27) reads its last result.
|
||||
name: rust-advisories
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '17 3 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
advisories:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: docker build -f docker/rust-builder.Dockerfile -t faunosteo_rust_builder:1.99.0 docker
|
||||
- run: bash docker/rust-run.sh cargo deny check advisories
|
||||
Reference in new issue
Block a user