Compare commits

...

4 Commits

Author SHA1 Message Date
xiongxiao
eab631c60b udpate 2026-01-12 14:17:39 +08:00
xiongxiao
4d119bdf56 update 2026-01-12 14:16:22 +08:00
xiongxiao
64f24910cb update 2026-01-12 14:12:10 +08:00
xiongxiao
4285a4760f test 2026-01-12 14:10:41 +08:00
2 changed files with 28 additions and 40 deletions

View File

@@ -1,10 +1,14 @@
# .cnb.yml
include:
- https://cnb.cool/kevisual/cnb/-/blob/main/.cnb/template.yml
- config:
.common_env: &common_env
env:
TO_REPO: kevisual/cnb
TO_URL: git.xiongxiao.me
imports:
- https://cnb.cool/kevisual/env/-/blob/main/.env.development
$:
vscode:
- docker:
@@ -18,38 +22,22 @@ $:
# - name: pnpm install
# script: pnpm install
.common_env: &common_env
env:
TO_REPO: kevisual/cnb
TO_URL: git.xiongxiao.me
.common_sync_to_gitea: &common_sync_to_gitea
- <<: *common_env
services: !reference [.common_sync_to_gitea_template, services]
stages: !reference [.common_sync_to_gitea_template, stages]
.common_sync_from_gitea: &common_sync_from_gitea
- <<: *common_env
services: !reference [.common_sync_from_gitea_template, services]
stages: !reference [.common_sync_from_gitea_template, stages]
main:
web_trigger_sync_to_gitea:
- <<: *common_env
services: !reference [.common_sync_to_gitea, services]
imports: !reference [.common_sync_to_gitea, imports]
stages: !reference [.common_sync_to_gitea, stages]
- <<: *common_sync_to_gitea
web_trigger_sync_from_gitea:
- <<: *common_env
stages:
- name: "测试变量"
script: |
echo "TO_REPO: ${TO_REPO}"
echo "TO_URL: ${TO_URL}"
echo '从gitea同步'
- <<: *common_sync_from_gitea
api_trigger_sync_to_gitea:
- <<: *common_env
stages:
- name: "测试变量"
script: |
echo "TO_REPO: ${TO_REPO}"
echo "TO_URL: ${TO_URL}"
echo '同步到gitea'
- <<: *common_sync_to_gitea
api_trigger_sync_from_gitea:
- <<: *common_env
stages:
- name: "测试变量"
script: |
echo "TO_REPO: ${TO_REPO}"
echo "TO_URL: ${TO_URL}"
echo '同步到gitea'
- <<: *common_sync_from_gitea

View File

@@ -1,4 +1,4 @@
.common_sync_to_gitea: &common_sync_to_gitea
.common_sync_to_gitea_template: &common_sync_to_gitea_template
services:
- docker
imports:
@@ -21,7 +21,7 @@
sync_mode: rebase
branch: main
.common_sync_from_gitea: &common_sync_from_gitea
.common_sync_from_gitea_template: &common_sync_from_gitea_template
services:
- docker
imports:
@@ -41,10 +41,10 @@
# main:
# web_trigger_sync_to_gitea:
# - <<: *common_sync_to_gitea
# - <<: *common_sync_to_gitea_template
# web_trigger_sync_from_gitea:
# - <<: *common_sync_from_gitea
# - <<: *common_sync_from_gitea_template
# api_trigger_sync_to_gitea:
# - <<: *common_sync_to_gitea
# - <<: *common_sync_to_gitea_template
# api_trigger_sync_from_gitea:
# - <<: *common_sync_from_gitea
# - <<: *common_sync_from_gitea_template