File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,11 +40,28 @@ jobs:
4040
4141 - name : Copy output to target repository
4242 run : |
43- # Remove existing content except .git
4443 cd skills-repo
45- find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
46-
47- # Copy all content from .skills-repo-output
44+
45+ echo "Cleaning auto-generated content, keeping whitelisted local skills..."
46+
47+ # 1. 只删除自动生成的内容,保留白名单目录
48+ # - 保留:setup-cloudbase-openclaw
49+ # - 保留:所有以 local- 前缀命名的目录(比如 local-*, 方便以后扩展)
50+ for entry in $(find . -mindepth 1 -maxdepth 1 ! -name '.git'); do
51+ name="$(basename "$entry")"
52+
53+ case "$name" in
54+ setup-cloudbase-openclaw|local-*)
55+ echo "Keep local skill : $name"
56+ ;;
57+ *)
58+ echo "Remove generated entry : $name"
59+ rm -rf "$entry"
60+ ;;
61+ esac
62+ done
63+
64+ # 2. 拷贝生成产物覆盖(如果有同名目录,会被上面的删除逻辑释放出来)
4865 cp -r ../.skills-repo-output/* .
4966
5067 - name : Commit and push changes
You can’t perform that action at this time.
0 commit comments