Files
fyne/.gitlab-ci.yml
2025-06-12 03:31:38 +00:00

24 lines
713 B
YAML

# .gitlab-ci.yml
stages:
- build # 必须包含 build 阶段
- test # 必须包含 test 阶段
- deploy # 必须包含 deploy 阶段
- sync # 自定义同步阶段
variables:
GIT_STRATEGY: none # 全局禁用默认代码检出
sync_external_repo:
stage: sync # 使用自定义阶段
script:
# 初始化空仓库
- git init .
# 添加外部仓库源
- git remote add external https://gitee.com/yanzuoguang1/fyne.git
# 获取所有分支和标签
- git fetch external --prune --tags
# 强制推送到当前仓库
- git push --force origin "refs/remotes/external/*:refs/heads/*"
- git push --tags --force
only:
- schedules # 仅定时任务触发