forked from mautic/mautic
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (94 loc) · 3.42 KB
/
split-monorepo-in-multi-repo.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: 'Split up the monorepo into subrepositories for composer purposes'
on:
push:
# Only trigger for specific branches or changes in specific paths.
branches:
- '[0-9].*'
- 'gitsplit-action-debug'
paths:
- app/**
- plugins/**
- themes/**
# also run when actions are being modified for testing purposes.
- .github/**
# Tag push events should be ignored, they will be handled with the create event below.
tags-ignore:
- '*'
create:
tags:
- '*'
branches:
- '[0-9].*'
- 'gitsplit-action-debug'
delete:
tags:
- '*'
branches:
- '[0-9].*'
- 'gitsplit-action-debug'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
sync:
if: github.repository == 'mautic/mautic'
runs-on: ubuntu-latest
strategy:
matrix:
config:
- core-lib
- plugin-clearbit
- plugin-cloudstorage
- plugin-crm
- plugin-emailmarketing
- plugin-focus
- plugin-fullcontact
- plugin-gmail
- plugin-grapesjs
- plugin-outlook
- plugin-social
- plugin-tagmanager
- plugin-zapier
- theme-aurora
- theme-blank
- theme-brienz
- theme-cards
- theme-coffee
- theme-confirmme
- theme-fresh-center
- theme-fresh-fixed
- theme-fresh-left
- theme-fresh-wide
- theme-goldstar
- theme-mauve
- theme-nature
- theme-neopolitan
- theme-oxygen
- theme-paprika
- theme-skyline
- theme-sparse
- theme-sunday
- theme-trulypersonal
- theme-vibrant
name: Sync commits into mautic/${{ matrix.config }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
# Add a personal access token to the repository secrets. This will allow the splitter action to push the new commits
- uses: frankdejonge/[email protected]
with:
authentication: 'username:${{ secrets.ACCESS_TOKEN }}'
user_name: 'Mautic CI'
user_email: '[email protected]'
# Cache the splitsh executable to speedup future runs
- name: Cache splitsh-lite
uses: actions/cache@v3
with:
path: './splitsh'
key: '${{ runner.os }}-${{ matrix.config }}-splitsh-v101'
# Sync commits and tags for the configured subtree splits
- name: subtree split
uses: acrobat/[email protected]
with:
config-path: .github/workflows/gitsplit/${{ matrix.config }}.json # Reference the location where you saved your config file