File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments