rouse-context/.github/workflows
Jason Monk 7c5397661f
Fix #215: Render relay env + firebase-sa from GH secrets at deploy time (#219)
Move all relay runtime secrets off manually-maintained /etc/rouse-relay/env
and into GitHub repo secrets. The deploy workflow now renders both the
systemd EnvironmentFile and the Firebase service account JSON from repo
secrets on each run, scps them to /tmp, then moves them into
/etc/rouse-relay/ with the correct ownership and mode.

Rotation is now a gh secret set + workflow_dispatch instead of an SSH
session. Bootstrapping a fork only needs the secrets populated — no more
remembering which env vars the VPS needs.

- relay-deploy.yml: new "Render" step writes env + firebase-sa.json into a
  mode-0700 tempdir using printf + file redirection (never echo, never
  secret values on argv). Deploy step scps and installs alongside the
  binary. Tempdir is shredded on exit.
- scripts/backfill-relay-secrets.sh: maintainer tool that re-syncs GH
  secrets from the live VPS. Explicit "yes" prompt, set -u -o pipefail
  (no -x to avoid leaking values), shred -u on exit, never echoes
  secret values.
- docs/self-hosting.md: new appendix documenting the secret inventory,
  naming convention split (existing CLOUDFLARE_* unprefixed; new
  RELAY_*), rotation procedure, and pointer to the backfill script.

Secrets already populated on the repo (values pulled from the running
VPS and verified byte-for-byte parity with the workflow-rendered output):
  CLOUDFLARE_API_TOKEN, CLOUDFLARE_ZONE_ID (pre-existing, re-synced),
  RELAY_RUST_LOG, RELAY_GTS_EAB_KID, RELAY_GTS_EAB_HMAC,
  RELAY_FIREBASE_SERVICE_ACCOUNT_JSON (base64 of firebase-sa.json).

First post-merge deploy will overwrite /etc/rouse-relay/env and
firebase-sa.json with the workflow-rendered versions. Parity confirmed
before merging; flagging for user's eyes on the first run.

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
2026-04-17 19:39:41 -04:00
..
android-ci.yml Run integration tests independently of unit test step 2026-04-15 22:28:07 -04:00
ci.yml Fix #152: Replace TlsAcceptor java.io API with suspend-native channels 2026-04-14 22:50:03 -04:00
pages.yml Fix #191: add GitHub Actions workflow for deploying docs/user to GitHub Pages 2026-04-16 17:19:21 -04:00
relay-cert-renew.yml Use REPO_PAT for writing cert to GitHub Secrets 2026-04-05 12:19:02 -04:00
relay-ci.yml Add Android CI and Relay CI workflows 2026-04-05 19:46:36 -04:00
relay-deploy.yml Fix #215: Render relay env + firebase-sa from GH secrets at deploy time (#219) 2026-04-17 19:39:41 -04:00