-
Notifications
You must be signed in to change notification settings - Fork 0
136 lines (124 loc) · 5.48 KB
/
split.yaml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: 'Packages Split'
on:
push:
branches:
- main
- develop
tags:
- '*'
env:
# 1. for Github split -- Based on PAT https://github.com/settings/tokens/1122824921
GITHUB_TOKEN: ${{ secrets.ROADIZ_SPLIT_ACCESS_TOKEN }}
jobs:
packages_split:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# define package to repository map
package:
-
local_path: 'DocGenerator'
split_repository: 'doc-generator'
default_branch: 'main'
-
local_path: 'Documents'
split_repository: 'documents'
default_branch: 'master'
-
local_path: 'DtsGenerator'
split_repository: 'dts-generator'
default_branch: 'main'
-
local_path: 'EntityGenerator'
split_repository: 'entity-generator'
default_branch: 'main'
-
local_path: 'Jwt'
split_repository: 'jwt'
default_branch: 'main'
-
local_path: 'Markdown'
split_repository: 'markdown'
default_branch: 'master'
-
local_path: 'Models'
split_repository: 'models'
default_branch: 'master'
-
local_path: 'OpenId'
split_repository: 'openid'
default_branch: 'main'
-
local_path: 'Random'
split_repository: 'random'
default_branch: 'main'
-
local_path: 'RoadizCompatBundle'
split_repository: 'compat-bundle'
default_branch: 'main'
-
local_path: 'RoadizCoreBundle'
split_repository: 'core-bundle'
default_branch: 'main'
-
local_path: 'RoadizFontBundle'
split_repository: 'font-bundle'
default_branch: 'main'
-
local_path: 'RoadizRozierBundle'
split_repository: 'rozier-bundle'
default_branch: 'main'
-
local_path: 'RoadizUserBundle'
split_repository: 'user-bundle'
default_branch: 'main'
-
local_path: 'Rozier'
split_repository: 'rozier'
default_branch: 'main'
-
local_path: 'RoadizTwoFactorBundle'
split_repository: 'two-factor-bundle'
default_branch: 'main'
steps:
- uses: actions/checkout@v2
# no tag
- if: github.ref == 'refs/heads/develop'
uses: "danharrin/[email protected]"
with:
# ↓ split "lib/local_path" directory
package_directory: 'lib/${{ matrix.package.local_path }}'
# ↓ into https://github.com/roadiz/split_repository repository
repository_organization: 'roadiz'
branch: develop
repository_name: '${{ matrix.package.split_repository }}'
# ↓ the user signed under the split commit
user_name: "roadiz-ci"
user_email: "[email protected]"
- if: github.ref == 'refs/heads/main'
uses: "danharrin/[email protected]"
with:
# ↓ split "lib/local_path" directory
package_directory: 'lib/${{ matrix.package.local_path }}'
# ↓ into https://github.com/roadiz/split_repository repository
repository_organization: 'roadiz'
branch: ${{ matrix.package.default_branch }}
repository_name: '${{ matrix.package.split_repository }}'
# ↓ the user signed under the split commit
user_name: "roadiz-ci"
user_email: "[email protected]"
# with tag
- if: "startsWith(github.ref, 'refs/tags/')"
uses: "danharrin/[email protected]"
with:
tag: ${GITHUB_REF#refs/tags/}
# ↓ split "lib/local_path" directory
package_directory: 'lib/${{ matrix.package.local_path }}'
branch: ${{ matrix.package.default_branch }}
# ↓ into https://github.com/roadiz/split_repository repository
repository_organization: 'roadiz'
repository_name: '${{ matrix.package.split_repository }}'
# ↓ the user signed under the split commit
user_name: "roadiz-ci"
user_email: "[email protected]"