Skip to content

Commit 2b076aa

Browse files
committed
init
1 parent 5cb40c5 commit 2b076aa

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync to Mirror Repositories
2+
3+
on:
4+
workflow_dispatch: # 允许手动触发
5+
6+
jobs:
7+
sync:
8+
if: github.repository_owner == 'babalae'
9+
runs-on: ubuntu-latest
10+
environment:
11+
name: product
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0 # 获取完整的git历史记录
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: Set up Git
20+
run: |
21+
git config --global user.name "github-actions[bot]"
22+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
23+
24+
- name: Sync to CNB
25+
run: |
26+
git remote add cnb https://cnb.cool/bettergi/genshin-redeem-code.git || true
27+
git push https://cnb:${{ secrets.CNB_TOKEN }}@cnb.cool/bettergi/genshin-redeem-code.git main
28+
continue-on-error: true
29+

0 commit comments

Comments
 (0)