name: 'Split up the monorepo into subrepositories'

on:
    push:
        branches:
            - '5.*'
            - '6.*'
        paths:
            - src/**
    create:
        tags:
            - '*'
    delete:
        tags:
            - '*'

jobs:
    sync_commits:
        runs-on: ubuntu-latest
        name: Sync commits
        if: github.repository == 'Kunstmaan/KunstmaanBundlesCMS'
        steps:
            -   uses: actions/checkout@v2
                with:
                    persist-credentials: false
                    fetch-depth: 0

            -   uses: frankdejonge/use-github-token@1.0.1
                with:
                    authentication: 'kunstmaanlabs:${{ secrets.SPLITTER_TOKEN }}'
                    user_name: 'Kunstmaan CMS'
                    user_email: 'cms@kunstmaan.be'

            -   name: Cache splitsh-lite
                uses: actions/cache@v2
                with:
                    path: |
                        ./splitsh
                        ./splitsh.db
                    key: '${{ runner.os }}-splitsh-v101'

            -   name: Subtree split
                uses: acrobat/subtree-splitter@batch-process-splits
                with:
                    config-path: .build/subtree-splitter-config.json
                    batch-size: 1

name: 'Split up the monorepo into subrepositories'

on:
    push:
        branches:
            - '5.*'
            - '6.*'
    create:
        tags:
            - '*'
    delete:
        tags:
            - '*'

jobs:
    sync_commits:
        runs-on: ubuntu-latest
        name: Sync commits
        if: github.repository == 'Kunstmaan/KunstmaanBundlesCMS'
        steps:
            -   uses: actions/checkout@v2
                with:
                    persist-credentials: false
                    fetch-depth: 0

            -   uses: frankdejonge/use-github-token@1.0.1
                with:
                    authentication: 'kunstmaanlabs:${{ secrets.SPLITTER_TOKEN }}'
                    user_name: 'Kunstmaan CMS'
                    user_email: 'cms@kunstmaan.be'

            -   name: Cache splitsh-lite
                uses: actions/cache@v2
                with:
                    path: |
                        ./splitsh
                        ./splitsh.db
                    key: '${{ runner.os }}-splitsh-v101'

            -   name: Subtree split
                uses: acrobat/subtree-splitter@v1
                with:
                    config-path: .build/subtree-splitter-config.json
                    batch-size: 1

Use stable version of subtree splitter and don't limit on path to allow splitting of newly pushed branches
[AllBundles] Use stable version of subtree splitter and don't limit on path to allow splitting of newly pushed branches
