Files
pinnacle/.gitea/workflows/build.yml
T
Neon Overlord f5c43a6876
build / build (push) Failing after 0s
ci: build in the psn runner, artifact the static export
npm ci is possible as of the lockfile commit; sapper resolves from
mirror/sapper. The static export is the artifact -- it is what the
Nextcloud wrapper will serve.

Assisted-by: Claude Code:claude-fable-5
2026-08-05 09:14:48 -07:00

47 lines
1.8 KiB
YAML

name: build
# Pinnacle CI -- psn-runner house pattern (see ops/psn-docker README "The CI").
# Toolchain from psn-base + deb.bawnet.io; dependency tree pinned by the
# committed package-lock.json; sapper comes from mirror/sapper on this node.
# Nothing in this build touches github.com or any registry outside the
# lockfile-pinned npm fetches.
on:
push:
branches: [main]
tags: ['v*']
workflow_dispatch:
jobs:
build:
runs-on: psn
steps:
- name: build pinnacle
run: |
set -e
. /etc/psn-ci.env
WORK=$(mktemp -d)
OUT=/var/tmp/psn-artifacts/pinnacle
git clone -q "https://$CI_USER:$CI_TOKEN@code.bawnet.io/bawnet/pinnacle" "$WORK"
echo "building pinnacle @ $(cd "$WORK" && git rev-parse --short HEAD)"
mkdir -p "$OUT"
docker run --rm -v "$WORK":/src -v "$OUT":/out -w /src \
code.bawnet.io/ops/psn-base:latest \
bash -euo pipefail -c "
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y -qq --no-install-recommends \
nodejs npm git ca-certificates python3 make g++ >/dev/null
node --version; npm --version
npm ci --no-audit --no-fund
npm run build
VERSION=\$(python3 -c \"import json;print(json.load(open('package.json'))['version'])\")
tar -czf /out/pinnacle-\$VERSION-export.tar.gz -C __sapper__ export
cd /out && sha256sum pinnacle-\$VERSION-export.tar.gz | tee pinnacle-\$VERSION-export.tar.gz.sha256
"
docker run --rm -v "$WORK":/w code.bawnet.io/ops/psn-base:latest chown -R "$(id -u):$(id -g)" /w
rm -rf "$WORK"
echo "artifact:"; ls -lh "$OUT"