-
-
Notifications
You must be signed in to change notification settings - Fork 16
42 lines (37 loc) · 1.09 KB
/
split.yml
File metadata and controls
42 lines (37 loc) · 1.09 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
40
41
42
name: split repos
on:
workflow_dispatch:
inputs:
repo:
description: 'Repo name to split, leave empty to split all'
required: false
default: ''
jobs:
split:
name: Split on branch ${{ github.ref }}
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_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "StrictHostKeyChecking no" >> ~/.ssh/config
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Split and push
run: |
git config pull.rebase true
git config --global user.email "albert@hypervel.org"
git config --global user.name "Hypervel"
if [ -z "${{ github.event.inputs.repo }}" ]; then
bash ./bin/split.sh
else
bash ./bin/split.sh ${{ github.event.inputs.repo }}
fi