|
@@ -0,0 +1,16 @@
|
|
|
|
|
+# CNB 流水线:推送到 main 之后,自动把仓库同步到公司 Gogs 镜像。
|
|
|
|
|
+# 这样「只推一个源(CNB)」即可,Gogs 自动跟随。
|
|
|
|
|
+# 需要两个仓库级变量(CNB 仓库设置 → 环境变量/密钥):
|
|
|
|
|
+# GOGS_USER = wangshuo
|
|
|
|
|
+# GOGS_TOKEN = <Gogs 访问令牌/密码>
|
|
|
|
|
+main:
|
|
|
|
|
+ push:
|
|
|
|
|
+ - stages:
|
|
|
|
|
+ - name: sync to gogs mirror
|
|
|
|
|
+ image: tencentcom/git-sync
|
|
|
|
|
+ settings:
|
|
|
|
|
+ target_url: http://49.235.130.76/TeamPLT/Gallery.git
|
|
|
|
|
+ auth_type: https
|
|
|
|
|
+ username: ${GOGS_USER}
|
|
|
|
|
+ password: ${GOGS_TOKEN}
|
|
|
|
|
+ force: true
|