This commit is contained in:
2026-01-12 03:16:35 +08:00
parent c2dcc53018
commit 5310ff28ae
48 changed files with 1349 additions and 254 deletions

View File

@@ -18,17 +18,15 @@ $:
imports:
- https://cnb.cool/kevisual/env/-/blob/main/.env.development
env:
FROM_REPO: kevisual/cnb
TO_REPO: kevisual/cnb
TO_URL: git.xiongxiao.me
stages:
- name: '同步到自己的仓库'
script: echo "同步到自己的仓库 ${TO_REPO}, ${GITEA_TOKEN}"
- name: 'show git remote'
- name: '显示 git remote'
script: git remote -v
- name: sync to gitea
image: tencentcom/git-sync
settings:
target_url: https://git.xiongxiao.me/${TO_REPO}.git
target_url: https://${TO_URL}/${TO_REPO}.git
auth_type: https
username: "oauth2"
password: ${GITEA_TOKEN}
@@ -42,13 +40,13 @@ $:
imports:
- https://cnb.cool/kevisual/env/-/blob/main/.env.development
env:
FROM_REPO: kevisual/cnb
TO_REPO: kevisual/cnb
TO_URL: git.xiongxiao.me
stages:
- name: '添加 gitea的origin'
script: |
git remote remove gitea 2>/dev/null || true
git remote add gitea https://oauth2:${GITEA_TOKEN}@git.xiongxiao.me/kevisual/cnb.git
git remote add gitea https://oauth2:${GITEA_TOKEN}@${TO_URL}/${TO_REPO}.git
- name: '同步gitea代码到当前仓库'
script: git pull gitea main
- name: '提交到原本的origin'