-
-
Notifications
You must be signed in to change notification settings - Fork 28
39 lines (36 loc) · 1.08 KB
/
split.yaml
File metadata and controls
39 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Split Repositories
on:
workflow_dispatch:
inputs:
repo:
description: 'Input repo name to split, e.g. sentry, cache, etc.'
required: false
default: ''
jobs:
split:
name: Split on branch ${{ github.ref }}
if: github.repository == 'friendsofhyperf/components'
runs-on: ubuntu-22.04
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.email "huangdijia@gmail.com"
git config --global user.name "Deeka Wong"
if [ -z "${{ github.event.inputs.repo }}" ]; then
./bin/split-linux.sh
else
./bin/split-linux.sh ${{ github.event.inputs.repo }}
fi