Fork 项目
JackA1ltman edited this page 2026-04-13 17:20:00 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Fork 项目

利用 Action 构建内核 · 第一步

到这一步开始,一切都会变得顺利许多。

Fork 步骤

  1. 找到项目 Star 旁边的 Fork 并点击
  2. 保留或修改 Repository name
  3. 去掉「Copy the mainline branch only」选项
  4. 点击 Create fork

获取 YML 模板

# Clone 项目到本地
git clone https://github.com/<你的用户名>/NonGKI_Kernel_Build_2nd.git
cd NonGKI_Kernel_Build_2nd

# 切换至 sample 分支,复制模板文件
git switch sample
cp .github/workflows/build-sample.yml ~/

# 切换回 mainline 分支
git switch mainline

# 将模板移动至 workflows 目录
mv ~/build-sample.yml .github/workflows/

也可以直接在网页上通过 raw 链接下载 build-sample.yml

YML 文件命名规则

如果你计划提交 PR文件命名必须遵循以下规则

build-{品牌}-{型号}-{系统简写}-{Android版本}-{内核名(可选)}.yml

示例:build-xiaomi-polaris-los-a15.yml

系统名称简写规则LineageOS → los,其他系统类似缩写。

name 字段格式

name: Build {品牌} {型号} ({完整系统名称} {Android版本}) {内核名(可选)}

示例:Build Xiaomi Mix2s (LineageOS A15)

第二处 name 字段job 内)不需要 Build 前缀。

创建 SuSFS 二次补丁单独项目

若你需要将二次修补补丁用于自动化流程,建议为其创建一个独立的 GitHub 仓库进行管理。

  1. 点击 GitHub 右上角头像,找到 Repositories 并点击进入
  2. 点击右上角绿色 New 按钮
  3. Repository name* 处填写仓库名称,例如:NonGKI_Kernel_Patches
  4. 点击右下角 Create repository 完成创建

Clone 到本地后,建议按设备维度创建对应子目录来存放补丁文件,便于在 YML 中填写路径,例如:

NonGKI_Kernel_Patches/
└── evox_mix2s_a15/
    └── susfs_fixed.patch