etherpad-lite/.github/workflows
John McLear 301ae4df2c
feat: add one-line installer script (#7466) (#7485)
* feat: add one-line installer script (#7466)

Adds bin/installer.sh, a small POSIX shell script that:
- Verifies prerequisites (git, Node.js >= 18)
- Installs pnpm globally if missing (with sudo fallback)
- Clones etherpad-lite (configurable branch / dir)
- Runs `pnpm i` and `pnpm run build:etherpad`
- Optionally starts Etherpad if ETHERPAD_RUN=1

Users can now install Etherpad with a single command:

  curl -fsSL https://raw.githubusercontent.com/ether/etherpad-lite/master/bin/installer.sh | sh

README updated to feature the one-liner above the existing
Docker-Compose / manual install instructions.

Closes #7466

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

* test: add installer-test workflow + Windows PowerShell installer

- bin/installer.ps1: PowerShell port of installer.sh so the one-liner
  also works on Windows via 'irm ... | iex'.
- .github/workflows/installer-test.yml: end-to-end CI that runs each
  installer against the PR's own commit (via ETHERPAD_REPO/BRANCH env
  vars), verifies clone + node_modules + admin SPA artifacts, and
  smoke-tests by starting Etherpad and curling /api. Runs on
  ubuntu-latest, macos-latest, and windows-latest. Includes a
  shellcheck job for installer.sh.
- README: feature the Windows one-liner alongside the POSIX one.

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

* test: fix windows smoke test - wrap pnpm in cmd /c

Start-Process can't run pnpm.cmd directly ("not a valid Win32 application").
Wrap it via cmd.exe /c instead, and bump the wait window to 90s for slower
Windows runners. Also dump stderr alongside stdout when the smoke test
fails for easier debugging.

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

* fix: address Qodo review on installer (#7485)

Two correctness issues caught by Qodo:

1. Node version mismatch: installer required Node >= 18, but the repo's
   engines.node is >= 20. Bump REQUIRED_NODE_MAJOR to 20 in both shell
   and PowerShell installers, and update the README's quick-install
   prerequisite and Requirements section to match.

2. Branch ignored for existing checkouts: when ETHERPAD_DIR already
   existed, the script ran 'git pull --ff-only' on whatever branch
   happened to be checked out, ignoring ETHERPAD_BRANCH and never
   verifying ETHERPAD_REPO. The existing-dir path now:
   - validates the remote URL matches ETHERPAD_REPO
   - refuses to clobber uncommitted changes (excluding pnpm-lock.yaml,
     which pnpm i rewrites during install)
   - fetches with --tags --prune
   - checks out ETHERPAD_BRANCH as a branch or detaches at it as a tag
   - prints the resulting commit short SHA for clarity

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:10:22 +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/deploy-pages from 4 to 5 (#7391) 2026-03-30 21:27:35 +02:00
codeql-analysis.yml build(deps): bump actions/checkout from 5 to 6 (#7233) 2025-11-30 20:31:22 +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 build(deps): bump docker/setup-qemu-action from 3 to 4 (#7351) 2026-03-08 22:35:34 +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 actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +01: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 build(deps): bump actions/cache from 4 to 5 (#7264) 2025-12-19 21:24:15 +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 build(deps): bump actions/checkout from 4 to 6 (#7411) 2026-04-01 19:58:33 +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