-
-
Notifications
You must be signed in to change notification settings - Fork 158
46 lines (38 loc) · 1.26 KB
/
split.yml
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
43
44
45
46
name: Split
on:
push:
branches:
- 5.x
tags:
- '*'
permissions: read-all
defaults:
run:
# Simulate an interactive terminal with color support
shell: script -q -e -c "export TERM=xterm; bash {0}"
jobs:
monorepo-split:
name: Monorepo split
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3 # latest stable version
extensions: json, zlib
coverage: none
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
- name: Cache the monorepo split
uses: actions/cache@v4
with:
path: .monorepo-split-cache
key: dev-${GITHUB_REF##*/}
- name: Install the dependencies
run: composer global require contao/monorepo-tools:^0.2
- name: Split the monorepo
run: $HOME/.composer/vendor/bin/monorepo-tools split ${GITHUB_REF##*/} ${{ github.event.forced && '--force-push' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.MONOREPO_SPLIT_TOKEN }}