From ed7b2a62b0e9b2551a04664269bfabda29ebeb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Tue, 1 Nov 2022 15:24:23 +0800 Subject: [PATCH] Auto split repos in Github Actions. (#5173) --- .github/workflows/split.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/split.yml diff --git a/.github/workflows/split.yml b/.github/workflows/split.yml new file mode 100644 index 000000000..080927e68 --- /dev/null +++ b/.github/workflows/split.yml @@ -0,0 +1,32 @@ +name: Split Repos + +on: + push: + workflow_dispatch: + inputs: + event: + description: 'Input your event' + required: false + default: '' + +jobs: + split: + if: github.repository == 'hyperf/hyperf' + runs-on: ubuntu-latest + env: + SSH_PRIVATE_KEY: ${{ secrets.SPLIT_PRIVATE_KEY }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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.email "group@hyperf.io" + git config --global user.name "Hyperf Developers" + ./bin/split-linux.sh