mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 04:28:11 +08:00
将插件拆分工作流的主仓库判断从 ThinkAdminDeveloper 切换为 ThinkAdmin,匹配当前 GitHub 仓库名称。 主要内容: - 更新 github.repository 条件为 zoujingli/ThinkAdmin。 - 增加 v6-dev 与 v8-dev 分支 push 触发,推送开发分支后自动拆分同步插件仓库。 - 保留 workflow_dispatch 手动触发入口,便于补跑指定分支同步。
36 lines
868 B
YAML
36 lines
868 B
YAML
name: Split Repositories
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v6-dev
|
|
- v8-dev
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
split:
|
|
if: github.repository == 'zoujingli/ThinkAdmin'
|
|
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
|
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
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"
|
|
./.github/split-linux.sh
|