{"id":21223750,"url":"https://github.com/zmh-program/mahirocd","last_synced_at":"2025-07-10T14:30:48.681Z","repository":{"id":189263378,"uuid":"679683300","full_name":"zmh-program/mahirocd","owner":"zmh-program","description":"🍥 小寻轻量级 CI/CD 服务器自动部署工具 🍥 Mahiro lightweight CI/CD server automation deployment tool","archived":true,"fork":false,"pushed_at":"2023-08-21T09:16:12.000Z","size":148,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T01:35:11.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zmh-program.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-17T11:38:24.000Z","updated_at":"2025-01-17T15:40:29.000Z","dependencies_parsed_at":"2024-11-20T22:55:28.181Z","dependency_job_id":"f81f9353-e2ce-4095-8282-c48b78b8ed8e","html_url":"https://github.com/zmh-program/mahirocd","commit_stats":null,"previous_names":["zmh-program/mahirocd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zmh-program/mahirocd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmh-program%2Fmahirocd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmh-program%2Fmahirocd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmh-program%2Fmahirocd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmh-program%2Fmahirocd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmh-program","download_url":"https://codeload.github.com/zmh-program/mahirocd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmh-program%2Fmahirocd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264590772,"owners_count":23633638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T22:53:17.946Z","updated_at":"2025-07-10T14:30:48.341Z","avatar_url":"https://github.com/zmh-program.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🍥 Mahiro CD\n\n小寻轻量级 CI/CD 服务器自动部署工具\n\nMahiro lightweight CI/CD server automation deployment tool\n\n![stats](https://stats.deeptrain.net/repo/zmh-program/mahirocd)\n\n\u003c/div\u003e\n\n### 介绍 Introduction\nMahiro CD 是一个轻量级自托管CI/CD工具，用于在多服务器中进行自动构建和部署。\n类似于 Jenkins，但是更加轻量级，更加适合多服务器的自动部署。不暴露服务器的端口，更加安全。\n\nMahiro CD is a lightweight self-hosted CI/CD tool for automatic building and deployment in multiple servers.\nSimilar to Jenkins, but more lightweight and more suitable for automatic deployment of multiple servers. Do not expose the port of the server, more secure.\n\n### 架构 Architecture\n![Architecture](/docs/struct.png)\n\n### 特性 Features\n- [x] ⚡ 轻量级 Lightweight\n- [x] ✨ 分布式 Distributed\n- [x] 🛠 安全 Secure\n- [x] 🎨 易上手 Easy to use\n- [x] 🎈 跨平台 Cross platform\n- [x] 🔮 高性能 High performance\n- [x] 🔧 高扩展性 High scalability\n- [x] ⛏ 任务调度 Task scheduling\n- [x] 📋 日志存储 Log storage\n\n### 安装 Installation\n\u003e **Note**\n\u003e 请在环境中安装 `git` 和 `go`\n\u003e \n\u003e Please install `git` and `go` in the environment\n\n### 主节点 Master node\n```shell\ngit clone https://github.com/zmh-program/mahirocd.git\n./master.sh\n```\n\n### 从节点 Slave node\n```shell\ngit clone https://github.com/zmh-program/mahirocd.git\n./slave.sh\n```\n\n### 配置 Configuration\n\u003e 主节点 Master node\n```yaml\n# transport/config.yaml\n\nport: 306  # server port\nsecret: 114514  # secret key\n```\n\n\u003e 从节点 Slave node\n```yaml\n# config.yaml\nendpoint: ws://localhost:306 # master node address\n```\n\n### 使用 Usage\n配置类似于 **GitHub Actions**。在**.flow**文件夹下新建任意文件名，后缀为 *.yaml* 或 *.yml* 即新建一个任务，选择一个仓库，填写构建脚本，点击构建，即可完成自动构建和部署。\n\nThe configuration is similar to **GitHub Actions**. Create any file name in the **.flow** folder, with the suffix *.yaml* or *.yml* to create a task, select a repository, fill in the build script, click build, and you can complete the automatic build and deployment.\n\ne.g.\n1. 新建任务 new task\n    ```yaml\n    name: mahirocd  # task name\n    repo: \"zmh-program/mahirocd\"  # repository\n    path: \"/www/wwwroot/mahirocd\"  # working directory\n    steps:\n      - name: \"build frontend\"  # step name\n        run: | # script\n          pnpm install\n          pnpm build\n    \n      - name: \"build backend\"\n        run: go build .\n    \n    ```\n2. webhook\n    \n    \u003e _http(s)://**example.com**/events_\n\n   ![webhook](/docs/webhook.png)\n\n\n### 日志 Log\n日志文件存储在 `logs` 文件夹下，以任务名的hash命名。\n\nThe log file is stored in the `logs` folder and named after the hash of the task name.\n\n### 开源协议 License\nMIT License\n\n### 贡献 Contributing\n![contributions](https://stats.deeptrain.net/contributor/zmh-program/mahirocd)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmh-program%2Fmahirocd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmh-program%2Fmahirocd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmh-program%2Fmahirocd/lists"}