update
This commit is contained in:
33
.cnb.yml
33
.cnb.yml
@@ -25,17 +25,28 @@ $:
|
|||||||
script: echo "同步到自己的仓库 ${TO_REPO}, ${GITEA_TOKEN}"
|
script: echo "同步到自己的仓库 ${TO_REPO}, ${GITEA_TOKEN}"
|
||||||
- name: 'show git remote'
|
- name: 'show git remote'
|
||||||
script: git remote -v
|
script: git remote -v
|
||||||
- name: sync to gitea
|
# - name: sync to gitea
|
||||||
image: tencentcom/git-sync
|
# image: tencentcom/git-sync
|
||||||
settings:
|
# settings:
|
||||||
target_url: https://git.xiongxiao.me/${TO_REPO}.git
|
# target_url: https://git.xiongxiao.me/${TO_REPO}.git
|
||||||
auth_type: https
|
# auth_type: https
|
||||||
username: "oauth2"
|
# username: "oauth2"
|
||||||
password: ${GITEA_TOKEN}
|
# password: ${GITEA_TOKEN}
|
||||||
git_user: "abearxiong"
|
# git_user: "abearxiong"
|
||||||
git_email: "xiongxiao@xiongxiao.me"
|
# git_email: "xiongxiao@xiongxiao.me"
|
||||||
sync_mode: rebase
|
# sync_mode: rebase
|
||||||
branch: main
|
# branch: main
|
||||||
|
- name: '设置 git 用户信息'
|
||||||
|
script: |
|
||||||
|
git config --global user.name "abearxiong"
|
||||||
|
git config --global user.email "xiongxiao@xiongxiao.me"
|
||||||
|
- name: '添加 gitea的origin'
|
||||||
|
script: |
|
||||||
|
git remote remove gitea 2>/dev/null || true
|
||||||
|
git remote add gitea https://oauth2:${GITEA_TOKEN}@git.xiongxiao.me/${TO_REPO}.git
|
||||||
|
- name: '推送代码到 gitea'
|
||||||
|
script: git push gitea main
|
||||||
|
|
||||||
.common_sync_from_gitea: &common_sync_from_gitea
|
.common_sync_from_gitea: &common_sync_from_gitea
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|||||||
Reference in New Issue
Block a user