Skip to content

Commit 1594919

Browse files
authored
ci: 同步推送到 CNB (#2451)
1 parent 85308f8 commit 1594919

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/sync-cnb.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Sync to CNB
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["v*"]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
sync:
14+
if: ${{ github.repository == 'OneDragon-Anything/ZenlessZoneZero-OneDragon' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Push to CNB
23+
env:
24+
CNB_TOKEN: ${{ secrets.CNB_GIT_TOKEN }}
25+
run: |
26+
git remote add cnb "https://cnb:${CNB_TOKEN}@cnb.cool/OneDragon-Anything/ZenlessZoneZero-OneDragon.git"
27+
git push cnb "${GITHUB_REF}:${GITHUB_REF}"

0 commit comments

Comments
 (0)