将代码同步至 CNB (#4994)

This commit is contained in:
Glavo
2025-12-18 05:47:29 +08:00
committed by GitHub
parent 2d6e01fcf9
commit 056f30f6f5

18
.github/workflows/cnb.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: cnb.yml
on:
push
jobs:
run:
if: ${{ github.repository == 'HMCL-dev/HMCL' }}
runs-on: ubuntu-latest
steps:
- name: Mirror GitHub to CNB
env:
SOURCE_REPO: HMCL-dev/HMCL
TARGET_REPO: HMCL-dev/HMCL
run: |
git clone --mirror "https://github.com/$SOURCE_REPO.git" -- repo
cd repo
git push --mirror "https://${{ secrets.CNB_SYNC_USERNAME }}:${{ secrets.CNB_SYNC_TOKEN }}@cnb.cool/$TARGET_REPO.git"