README: document the runner IP allowlist on the deploy hooks #58
@@ -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" }
|
||||
],
|
||||
"trigger-rule": {
|
||||
"match": { "type": "payload-hmac-sha256", "secret": "<WORKER_WEBHOOK_SECRET>",
|
||||
"parameter": { "source": "header", "name": "X-Gitea-Signature" } }
|
||||
"and": [
|
||||
{ "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`,
|
||||
`PULSE_SERVER`, `PULSE_WS` and `WORKER_API_KEY`, and add its hook (one hook URL per host in the
|
||||
`Deploy worker` job).
|
||||
|
||||
Reference in new issue
Block a user