🦞 Lobsters | 📄 原文链接 | 2026-07-21 收录

极简 Git CI:用钩子和任务队列实现持续集成

来源:mccd.space — 2026-07-21

📋 概述

作者在个人服务器上自建 Git 仓库后需要一个 CI 系统,但市面上的方案要么过于复杂、要么 YAML 配置繁琐、要么自托管困难。最终他设计了一套极简方案:在裸仓库的 post-receive 钩子中使用 nq 任务队列来调度后台任务,实现推送即构建的 CI 流程。这种方式启动迅速、配置简单,可以通过 SSH 远程查看构建日志。文章还讨论了如何扩展这个基础方案,包括用 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.
← 返回 Lobsters 首页