Skip to content

Commit b7be9a7

Browse files
authored
feat: 添加 CNB 同步配置和工作流 (#1541)
* feat: 添加 CNB 同步配置和工作流 * feat: 更新 README 文件以添加 CNB 云原生开发徽章
1 parent fc55588 commit b7be9a7

File tree

5 files changed

+55
-2
lines changed

5 files changed

+55
-2
lines changed

.cnb.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# .cnb.yml
2+
"**":
3+
push:
4+
- imports:
5+
- https://cnb.cool/tencent/cherry-markdown/cherry-markdown-secret/-/edit/main/secret.yml
6+
stages:
7+
# cnb 同步代码到 github 仓库 https://cnb.cool/cnb/plugins/tencentcom/git-sync#%E4%BB%8E-cnb-%E5%90%8C%E6%AD%A5%E5%88%B0-github
8+
- name: sync to github
9+
image: tencentcom/git-sync
10+
settings:
11+
target_url: https://github.com/Tencent/cherry-markdown.git
12+
auth_type: https
13+
username: ${CHERRY_MARKDOWN_USERNAME}
14+
password: ${CHERRY_MARKDOWN_GITHUB_BLOG_TOKEN}
15+
insecure_skip_verify: true
16+
timeout: 300

.github/workflows/sync_to_cnb.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# .github/workflows/sync-cnb.yml
2+
3+
name: Sync to CNB
4+
on: [push]
5+
6+
jobs:
7+
sync:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Sync to CNB Repository
15+
uses: docker://tencentcom/git-sync
16+
env:
17+
PLUGIN_TARGET_URL: "https://cnb.cool/tencent/cherry-markdown/cherry-markdown.git"
18+
PLUGIN_AUTH_TYPE: "https"
19+
PLUGIN_USERNAME: "cnb"
20+
PLUGIN_PASSWORD: ${{ secrets.CHERRY_MARKDOWN_CNB_SYNC_GITHUB }}
21+
PLUGIN_FORCE: "true"

README.CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Cherry Markdown Writer
44

5-
[![Cloud Studio Template](https://cs-res.codehub.cn/common/assets/icon-badge.svg)](https://cloudstudio.net#https://github.com/Tencent/cherry-markdown)
5+
[![cnb 云原生开发](./logo/cnb-badge.svg)](https://cnb.cool/tencent/cherry-markdown/cherry-markdown) [![Cloud Studio Template](https://cs-res.codehub.cn/common/assets/icon-badge.svg)](https://cloudstudio.net#https://github.com/Tencent/cherry-markdown)
66

77
简体中文 | [English](./README.md)
88

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Cherry Markdown Writer
44

5-
[![Cloud Studio Template](https://cs-res.codehub.cn/common/assets/icon-badge.svg)](https://cloudstudio.net#https://github.com/Tencent/cherry-markdown)
5+
[![cnb 云原生开发](./logo/cnb-badge.svg)](https://cnb.cool/tencent/cherry-markdown/cherry-markdown) [![Cloud Studio Template](https://cs-res.codehub.cn/common/assets/icon-badge.svg)](https://cloudstudio.net#https://github.com/Tencent/cherry-markdown)
66

77
English | [简体中文](./README.CN.md)
88

logo/cnb-badge.svg

Lines changed: 16 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)