mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-08 04:48:10 +08:00
28 lines
758 B
YAML
28 lines
758 B
YAML
name: Split Repos
|
|
|
|
on: [ workflow_dispatch ]
|
|
|
|
jobs:
|
|
split:
|
|
if: github.repository == 'zoujingli/ThinkAdminDeveloper'
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SSH_PRIVATE_KEY: ${{ secrets.SPLIT_PRIVATE_KEY }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Private Key
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
echo "StrictHostKeyChecking no" >> ~/.ssh/config
|
|
- name: Split And Push
|
|
run: |
|
|
git config pull.rebase true
|
|
git config --global user.name "Anyon"
|
|
git config --global user.email "zoujingli@qq.com"
|
|
./bin/split-linux.sh
|