Files
Archivum/.gitea/workflows/build.yaml
Bjorn Blomberg cd588197b9
All checks were successful
build-and-push / build (push) Successful in 15m15s
feat: Authentik OIDC SSO, allow/deny RBAC, admin console & Gitea CI
Authentication & RBAC
- Add confidential OIDC client (Authentik) with /auth/oidc/login +
  /auth/oidc/callback: discovery, code exchange, id_token verify (go-oidc),
  groups claim → role (Archivum-admin → admin, else user). Sessions carry groups.
- Rework ACL into an allow/deny model (new `effect` column + migration).
  db.EffectiveAccess resolves user + all groups over the path and its ancestors:
  default deny, explicit deny always beats allow.
- Enforce ACL for ALL non-admin users (not just guest) across list/read/save/
  delete/move/create/history/diff/images/upload. Admins bypass.
- Seed built-in Archivum-admin / Archivum-reader groups; login allow-list on
  users & groups; public (guest) user access is ACL-configurable.

Admin API & UI
- New GraphQL ops: oidcConfig/updateOidcConfig, group CRUD, membership,
  setUserRole/setUserLogin/setGroupLogin, userGroups, loginOptions.
- Rebuilt AdminView: SSO config, user/group management + membership, login
  toggles, and an allow/deny access-control matrix per path.
- LoginView: "Sign in with Authentik" + public-user option; OIDC callback route.

Rendering/editor
- Fix bug where inline marks (bold/italic/code/strike/link) were dropped on
  TipTap→AsciiDoc save. Add RENDERING_IMPROVEMENTS.md with proposals.

CI / build
- .gitea/workflows/build.yaml: build on the Pi5 runner, push
  localhost:5000/archivum:{latest,<sha>}. Add .dockerignore; bump Go image to 1.25.
- Docs: ARCHITECTURE.md, README.md, docs/AUTHENTIK_SETUP.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 21:58:50 +02:00

36 lines
1.1 KiB
YAML

name: build-and-push
# Bygger Archivum-imagen på Pi5-runnern (arm64, nativt) och pushar till den lokala
# registryn. Ett enda multi-stage-bygge (frontend -> backend -> runtime), så
# build-context måste vara repo-roten (Dockerfile COPY:ar frontend/, backend/ och
# docker/entrypoint.sh). localhost:5000 trustas automatiskt av Docker på Pi5
# (ingen insecure-registry-config behövs där).
#
# Pull:a på Pi5 med localhost:5000/archivum:latest (t.ex. i dockge-stacken).
on:
push:
branches: [main, master]
paths:
- "backend/**"
- "frontend/**"
- "docker/**"
- ".gitea/workflows/build.yaml"
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build & push image
run: |
docker build --progress=plain \
-f docker/Dockerfile \
-t localhost:5000/archivum:latest \
-t "localhost:5000/archivum:${GITHUB_SHA::12}" \
.
docker push localhost:5000/archivum:latest
docker push "localhost:5000/archivum:${GITHUB_SHA::12}"