mirror of
https://github.com/shareAI-lab/learn-claude-code.git
synced 2026-08-25 08:12:14 +00:00
ci: remove fork-only upstream sync workflow
This commit is contained in:
parent
f2a1825d56
commit
e51a013eb5
1 changed files with 0 additions and 33 deletions
33
.github/workflows/sync-upstream.yml
vendored
33
.github/workflows/sync-upstream.yml
vendored
|
|
@ -1,33 +0,0 @@
|
|||
name: Sync fork with upstream
|
||||
|
||||
# 定时把本 fork 的 main 合入上游 shareAI-lab/learn-claude-code 的最新提交。
|
||||
# 因为这个 workflow 文件本身就在 main 上,main 与上游已分叉、无法 fast-forward,
|
||||
# 所以用 merge 而非 gh repo sync。结果:main = 全部上游更新 + 本自动化提交。
|
||||
# 自己的改动请始终开新分支,不要直接提交到 main,否则可能与上游产生合并冲突。
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *' # 每小时一次;想每天一次改成 '0 6 * * *'
|
||||
workflow_dispatch: # 也可在仓库 Actions 页面手动触发
|
||||
|
||||
permissions:
|
||||
contents: write # 合并后需要写权限 push 回 main
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# actions/checkout@v6 —— 与本仓库其它 workflow 用同一 pin
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0 # merge 需要完整历史
|
||||
|
||||
- name: Merge upstream/main into main
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git remote add upstream https://github.com/shareAI-lab/learn-claude-code.git
|
||||
git fetch upstream main
|
||||
git merge --no-edit upstream/main
|
||||
git push origin main
|
||||
Loading…
Add table
Add a link
Reference in a new issue