Skip to content

Commit

Permalink
Replace local split scripts with a Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-eugone committed Jun 12, 2024
1 parent 3af956c commit 210d1a1
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 102 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/split.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Packages Split'

on:
push:
branches:
- main
release:
types: [ published ]

jobs:
packages_split:
name: "Packages Split"
runs-on: "ubuntu-latest"

steps:
- name: "Checkout"
run: git clone https://github.com/yann-eugone/test-monorepo /home/runner/work/yann-eugone/test-monorepo && cd $_

- name: "Gitsplit"
run: docker run --rm -t -e GH_TOKEN -v /cache/gitsplit:/cache/gitsplit -v /home/runner/work/yann-eugone/test-monorepo:/srv jderusse/gitsplit gitsplit
env:
GH_TOKEN: ${{ secrets.GITSPLIT_TOKEN }}
49 changes: 49 additions & 0 deletions .gitsplit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Path to a cache directory Used to speed up the split over time by reusing git's objects
cache_url: "/cache/gitsplit"

# Packages to split
splits:
-
prefix: "src/batch"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-documentation.git"
-
prefix: "docs"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch.git"
-
prefix: "src/batch-doctrine-dbal"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-doctrine-dbal.git"
-
prefix: "src/batch-doctrine-orm"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-doctrine-orm.git"
-
prefix: "src/batch-doctrine-persistence"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-doctrine-persistence.git"
-
prefix: "src/batch-league-flysystem"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-league-flysystem.git"
-
prefix: "src/batch-openspout"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-openspout.git"
-
prefix: "src/batch-symfony-console"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-symfony-console.git"
-
prefix: "src/batch-symfony-framework"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-symfony-framework.git"
-
prefix: "src/batch-symfony-messenger"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-symfony-messenger.git"
-
prefix: "src/batch-symfony-pack"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-symfony-pack.git"
-
prefix: "src/batch-symfony-serializer"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-symfony-serializer.git"
-
prefix: "src/batch-symfony-validator"
target: "https://${GH_TOKEN}@github.com/yokai-php/batch-symfony-validator.git"

# List of references to split (defined as regexp)
origins:
- ^(0\.x)$ # the default branch
- ^v\d+\.\d+\.\d+$ # the version tags
51 changes: 0 additions & 51 deletions scripts/split-branch

This file was deleted.

51 changes: 0 additions & 51 deletions scripts/split-tag

This file was deleted.

Binary file removed scripts/splitsh-lite
Binary file not shown.

0 comments on commit 210d1a1

Please sign in to comment.