forked from Tencent/cherry-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1.02 KB
/
sync_to_cnb.yml
File metadata and controls
35 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# .github/workflows/sync-cnb.yml
name: Sync to CNB
on:
- push
- delete
jobs:
sync-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Sync to CNB Repository
uses: docker://tencentcom/git-sync
env:
PLUGIN_TARGET_URL: "https://cnb.cool/tencent/cherry-markdown/cherry-markdown.git"
PLUGIN_AUTH_TYPE: "https"
PLUGIN_USERNAME: "cnb"
PLUGIN_PASSWORD: ${{ secrets.CHERRY_MARKDOWN_CNB_SYNC_GITHUB }}
PLUGIN_FORCE: "true"
sync-delete-branch:
if: ${{ github.repository == 'Tencent/cherry-markdown' && github.event_name == 'delete' && github.event.ref_type == 'branch' }}
runs-on: ubuntu-latest
steps:
- uses: TDesignOteam//tdesign-pr-trigger-action@develop
with:
repo: 'tencent/cherry-markdown/cherry-markdown'
token: ${{ secrets.CHERRY_MARKDOWN_CNB_SYNC_GITHUB }}
branch: ${{ github.event.ref }}
trigger: '/delete-cnb-branch'