Merge pull request 'README: document the runner IP allowlist on the deploy hooks' (#58) from docs-hook-allowlist into main
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 21s
CI / Lint (eslint) (push) Successful in 24s
CI / Security (npm audit) (push) Successful in 14s
CI / Integration (api) (push) Successful in 1m26s
CI / Scan (secrets, workflows, shell) (push) Successful in 1m41s
CI / UI (playwright) (push) Successful in 1m38s
CI / Deploy (push) Successful in 14s
CI / Deploy worker (push) Successful in 7s
CI / Notify (push) Successful in 2s

This commit was merged in pull request #58.
This commit is contained in:
jared committed 2026-11-22 21:09:58 -05:00
commit 4459ce46cc
1 file changed
+9 -2
+9 -2
View File
@@ -713,12 +713,19 @@ and add a hook to `/etc/webhook/hooks.json`, with the same secret as the repo's
{ "source": "payload", "name": "ts" } { "source": "payload", "name": "ts" }
], ],
"trigger-rule": { "trigger-rule": {
"match": { "type": "payload-hmac-sha256", "secret": "<WORKER_WEBHOOK_SECRET>", "and": [
"parameter": { "source": "header", "name": "X-Gitea-Signature" } } { "match": { "type": "payload-hmac-sha256", "secret": "<WORKER_WEBHOOK_SECRET>",
"parameter": { "source": "header", "name": "X-Gitea-Signature" } } },
{ "match": { "type": "ip-whitelist", "ip-range": "10.10.10.70/32" } }
]
} }
} }
``` ```
Both Pulse hooks (`pulse-deploy` on CT 122 and `pulse-worker-deploy` on CT 153) only accept requests
from the CI runner, 10.10.10.70, as well as requiring the signature. If the runner's address changes,
deploys fail in CI (the verify step times out) until the `ip-range` is updated on both hosts.
To add a worker host, install Node 20 and the worker as above, give it a `.env` with `WORKER_NAME`, To add a worker host, install Node 20 and the worker as above, give it a `.env` with `WORKER_NAME`,
`PULSE_SERVER`, `PULSE_WS` and `WORKER_API_KEY`, and add its hook (one hook URL per host in the `PULSE_SERVER`, `PULSE_WS` and `WORKER_API_KEY`, and add its hook (one hook URL per host in the
`Deploy worker` job). `Deploy worker` job).