etherpad-lite/.github/workflows
John McLear 6bb879ed03
feat(packaging): add Debian (.deb) build via nfpm with systemd unit (#7559)
* feat(packaging): add Debian (.deb) build via nfpm with systemd unit

First-class Debian packaging for Etherpad, producing signed-ready
etherpad-lite_<version>_<arch>.deb artefacts for amd64 and arm64 from a
single nfpm manifest. Installing the package gives users:

- /opt/etherpad-lite with a prebuilt, self-contained node_modules/ — no
  pnpm required at runtime, just `nodejs (>= 20)`.
- etherpad system user/group, created via `adduser` in preinst.
- /etc/etherpad-lite/settings.json seeded from the template on first
  install, preserved across upgrades, removed on `purge`.
- /var/lib/etherpad-lite owned by etherpad:etherpad, with the default
  dirty-DB retargeted there so ProtectSystem=strict works.
- /lib/systemd/system/etherpad-lite.service — hardened unit
  (NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp,
  RestrictAddressFamilies) with Restart=on-failure.
- /usr/bin/etherpad-lite CLI wrapper running `node --import tsx/esm`.

CI (.github/workflows/deb-package.yml) triggers on v* tags, builds both
arches via native runners (ubuntu-latest + ubuntu-24.04-arm), smoke-tests
the amd64 package end-to-end (install → systemctl start → curl /health
→ purge → confirm user removed), and attaches the artefacts to the
GitHub Release.

Publishing to an APT repo (Cloudsmith, Launchpad PPA, self-hosted
reprepro) is intentionally out of scope — needs a governance decision on
who holds the signing key. Recipes are documented in packaging/README.md.

Refs #7529

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(deb): fail smoke test on /health timeout, tighten default-file perms, 2-space indent

Addresses Qodo review feedback on #7559:

1. Smoke test false-positive: the `for` loop polling /health never failed
   the job if the endpoint stayed down — `curl && break || sleep 2`
   keeps returning 0 from the trailing `sleep`, so `set -e` never
   trips. CI could attach a broken .deb to a release. Fix: track
   success explicitly and exit 1 (plus dump journald logs for
   diagnostics) when the service never becomes healthy.

2. /etc/default/etherpad-lite was world-readable (0644). systemd loads
   it via `EnvironmentFile=…`, and Etherpad supports
   ${ENV_VAR}-substitution for secrets (DB_PASSWORD etc.), so any
   local user could read anything admins drop there. Fix: install the
   conffile as root:etherpad 0640 — only root and the service user can
   read it.

3. Indentation: reflow maintainer scripts from 4-space to 2-space to
   match the repo style rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 18:45:50 +01:00
..
backend-tests.yml chore: reduce CI matrix for PRs to prevent runner exhaustion (#7463) 2026-04-05 10:14:20 +01:00
build-and-deploy-docs.yml build(deps): bump actions/upload-pages-artifact from 4 to 5 (#7517) 2026-04-14 22:10:07 +02:00
codeql-analysis.yml build(deps): bump actions/checkout from 5 to 6 (#7233) 2025-11-30 20:31:22 +01:00
deb-package.yml feat(packaging): add Debian (.deb) build via nfpm with systemd unit (#7559) 2026-04-22 18:45:50 +01:00
dependency-review.yml build(deps): bump actions/checkout from 5 to 6 (#7233) 2025-11-30 20:31:22 +01:00
docker.yml fix(#7570): bundle DB drivers, add regression CI (#7572) 2026-04-20 18:10:01 +01:00
frontend-admin-tests.yml fix: increase max socket.io message size to 10MB for large pastes (#7474) 2026-04-06 15:12:08 +01:00
frontend-tests.yml chore: reduce CI matrix for PRs to prevent runner exhaustion (#7463) 2026-04-05 10:14:20 +01:00
handleRelease.yml build(deps): bump softprops/action-gh-release from 2 to 3 (#7501) 2026-04-13 21:25:37 +02:00
installer-test.yml feat: add one-line installer script (#7466) (#7485) 2026-04-07 17:10:22 +01:00
load-test.yml Move load test to daily schedule instead of every push (#7425) 2026-04-01 19:03:19 +01:00
perform-type-check.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00
rate-limit.yml build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01:00
release.yml build(deps): bump reitzig/actions-asciidoctor from 2.0.3 to 2.0.4 (#7370) 2026-03-16 16:34:06 +00:00
releaseEtherpad.yml feat: migrate npm publish to OIDC trusted publishing (#7401) (#7490) 2026-04-07 17:38:23 +01:00
stale.yml build(deps): bump actions/stale from 9 to 10 (#7115) 2025-09-08 19:25:33 +02:00
update-plugins.yml ci(security): restrict GITHUB_TOKEN permissions in update-plugins workflow (#7557) 2026-04-19 17:26:42 +01:00
upgrade-from-latest-release.yml chore: reduce CI matrix for PRs to prevent runner exhaustion (#7463) 2026-04-05 10:14:20 +01:00