在 bare 仓库的 post-receive 钩子 中触发 CI,每次 git push 自动运行构建任务
使用 nq 极简任务队列将构建任务放到后台执行,避免阻塞 git push 操作
通过 ssh server nqtail -a 即可远程查看所有任务日志
钩子脚本失败会导致 push 被拒绝,因此需要将耗时任务异步化
可扩展方向:landlock 沙箱、podman 容器隔离、sops 密钥管理
💡 金句
The CI systems I found are convoluted, yaml-ridden, slow, messy or hard to self-host. I just need something that runs some tests, builds a project or moves some files.