feat: Add optional input for repo name in split workflow (#6850)

This commit is contained in:
Deeka Wong 2024-06-07 19:51:50 +08:00 committed by GitHub
parent 6a261dcc63
commit 7c0e350916
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,9 +1,16 @@
name: Split Repos
on: [ workflow_dispatch ]
on:
workflow_dispatch:
inputs:
repo:
description: 'Input repo name to split, e.g. di, cache, etc.'
required: false
default: ''
jobs:
split:
name: Split on branch ${{ github.ref }}
if: github.repository == 'hyperf/hyperf'
runs-on: ubuntu-latest
env:
@ -24,4 +31,9 @@ jobs:
git config pull.rebase true
git config --global user.email "group@hyperf.io"
git config --global user.name "Hyperf Developers"
if [ -z "${{ github.event.inputs.repo }}" ]; then
./bin/split-linux.sh
else
./bin/split-linux.sh ${{ github.event.inputs.repo }}
fi