-
Notifications
You must be signed in to change notification settings - Fork 77
35 lines (32 loc) · 1.38 KB
/
sync-to-cnb.yml
File metadata and controls
35 lines (32 loc) · 1.38 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
name: sync-to-cnb
on:
- push
- delete
jobs:
sync-push:
if: ${{ github.repository == 'TDesignOteam/tdesign-api' && github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Sync to CNB Repository
run: |
docker run --rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
-e PLUGIN_TARGET_URL="https://cnb.cool/tencent/tdesign/tdesign-api.git" \
-e PLUGIN_AUTH_TYPE="https" \
-e PLUGIN_USERNAME="cnb" \
-e PLUGIN_PASSWORD=${{ secrets.CNB_TOKEN }} \
-e PLUGIN_FORCE="true" \
tencentcom/git-sync
sync-delete-branch:
if: ${{ github.repository == 'TDesignOteam/tdesign-api' && github.event_name == 'delete' && github.event.ref_type == 'branch' }}
runs-on: ubuntu-latest
steps:
- uses: TDesignOteam/workflows/actions/cnb-delete-branch@03665411530c1eeaab075891d2ae88d9fe77cbc5 # main
with:
repo: "tencent/tdesign/tdesign-api"
token: ${{ secrets.CNB_TOKEN }}
branch: ${{ github.event.ref }}