Skip to content

Commit aef1302

Browse files
authored
Gitsplit (#458)
1 parent 519d219 commit aef1302

File tree

3 files changed

+67
-134
lines changed

3 files changed

+67
-134
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/.editorconfig export-ignore
88
/.gitattributes export-ignore
99
/.gitignore export-ignore
10+
/.gitsplit.yml export-ignore
1011
/monorepo-builder.php export-ignore
1112
/CODE_OF_CONDUCT.md export-ignore
1213
/deptrac.yaml export-ignore

.github/workflows/gitsplit.yml

Lines changed: 9 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,18 @@
11
name: gitsplit
22
on:
33
push:
4-
branches:
5-
- "*.x"
64
tags:
75
- '*'
8-
9-
env:
10-
GITHUB_TOKEN: ${{ secrets.GITSPLIT_TOKEN }}
6+
release:
7+
types: [published]
118

129
jobs:
13-
packages_split:
10+
gitsplit:
1411
runs-on: ubuntu-latest
15-
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
# define package to repository map
20-
package:
21-
-
22-
local_path: 'src/Component/Core'
23-
split_repository: 'jwt-core'
24-
-
25-
local_path: 'src/Component/Checker'
26-
split_repository: 'jwt-checker'
27-
-
28-
local_path: 'src/Component/Signature'
29-
split_repository: 'jwt-signature'
30-
-
31-
local_path: 'src/Component/Encryption'
32-
split_repository: 'jwt-encryption'
33-
-
34-
local_path: 'src/Component/KeyManagement'
35-
split_repository: 'jwt-key-mgmt'
36-
-
37-
local_path: 'src/Component/Console'
38-
split_repository: 'jwt-console'
39-
-
40-
local_path: 'src/Component/NestedToken'
41-
split_repository: 'jwt-nested-token'
42-
-
43-
local_path: 'src/Bundle/JoseFramework'
44-
split_repository: 'jwt-bundle'
45-
-
46-
local_path: 'src/EncryptionAlgorithm/ContentEncryption/AESCBC'
47-
split_repository: 'jwt-encryption-algorithm-aescbc'
48-
-
49-
local_path: 'src/EncryptionAlgorithm/ContentEncryption/AESGCM'
50-
split_repository: 'jwt-encryption-algorithm-aesgcm'
51-
-
52-
local_path: 'src/EncryptionAlgorithm/KeyEncryption/AESGCMKW'
53-
split_repository: 'jwt-encryption-algorithm-aesgcmkw'
54-
-
55-
local_path: 'src/EncryptionAlgorithm/KeyEncryption/AESKW'
56-
split_repository: 'jwt-encryption-algorithm-aeskw'
57-
-
58-
local_path: 'src/EncryptionAlgorithm/KeyEncryption/Direct'
59-
split_repository: 'jwt-encryption-algorithm-dir'
60-
-
61-
local_path: 'src/EncryptionAlgorithm/KeyEncryption/ECDHES'
62-
split_repository: 'jwt-encryption-algorithm-ecdh-es'
63-
-
64-
local_path: 'src/EncryptionAlgorithm/KeyEncryption/PBES2'
65-
split_repository: 'jwt-encryption-algorithm-pbes2'
66-
-
67-
local_path: 'src/EncryptionAlgorithm/KeyEncryption/RSA'
68-
split_repository: 'jwt-encryption-algorithm-rsa'
69-
-
70-
local_path: 'src/SignatureAlgorithm/ECDSA'
71-
split_repository: 'jwt-signature-algorithm-ecdsa'
72-
-
73-
local_path: 'src/SignatureAlgorithm/EdDSA'
74-
split_repository: 'jwt-signature-algorithm-eddsa'
75-
-
76-
local_path: 'src/SignatureAlgorithm/None'
77-
split_repository: 'jwt-signature-algorithm-none'
78-
-
79-
local_path: 'src/SignatureAlgorithm/HMAC'
80-
split_repository: 'jwt-signature-algorithm-hmac'
81-
-
82-
local_path: 'src/SignatureAlgorithm/RSA'
83-
split_repository: 'jwt-signature-algorithm-rsa'
84-
-
85-
local_path: 'src/SignatureAlgorithm/Experimental'
86-
split_repository: 'jwt-signature-algorithm-experimental'
87-
-
88-
local_path: 'src/EncryptionAlgorithm/Experimental'
89-
split_repository: 'jwt-encryption-algorithm-experimental'
90-
-
91-
local_path: 'src/Ecc'
92-
split_repository: 'jwt-util-ecc'
93-
-
94-
local_path: 'packs/encryption'
95-
split_repository: 'encryption-pack'
96-
-
97-
local_path: 'packs/signature'
98-
split_repository: 'signature-pack'
99-
10012
steps:
101-
- uses: actions/checkout@v3
102-
with:
103-
fetch-depth: 0
104-
105-
# no tag
106-
-
107-
if: "!startsWith(github.ref, 'refs/tags/')"
108-
uses: "symplify/monorepo-split-github-action@2.1"
109-
with:
110-
# ↓ split "src/*" directory
111-
package_directory: '${{ matrix.package.local_path }}'
112-
113-
# ↓ into https://github.com/web-token/* repository
114-
repository_organization: 'web-token'
115-
repository_name: '${{ matrix.package.split_repository }}'
116-
117-
# [optional, with "github.com" as default]
118-
#repository_host: git.private.com:1234
119-
120-
# ↓ the user signed under the split commit
121-
user_name: ${{ secrets.GIT_AUTHOR_NAME }}
122-
user_email: ${{ secrets.GIT_AUTHOR_EMAIL }}
123-
124-
# with tag
125-
-
126-
if: "startsWith(github.ref, 'refs/tags/')"
127-
uses: "symplify/monorepo-split-github-action@2.1"
128-
with:
129-
tag: ${GITHUB_REF#refs/tags/}
130-
131-
# ↓ split "src/*" directory
132-
package_directory: '${{ matrix.package.local_path }}'
133-
134-
# ↓ into https://github.com/web-token/* repository
135-
repository_organization: 'web-token'
136-
repository_name: '${{ matrix.package.split_repository }}'
137-
138-
# [optional, with "github.com" as default]
139-
#repository_host: git.private.com:1234
140-
141-
# ↓ the user signed under the split commit
142-
user_name: ${{ secrets.GIT_AUTHOR_NAME }}
143-
user_email: ${{ secrets.GIT_AUTHOR_EMAIL }}
13+
- name: checkout
14+
run: git clone https://github.com/web-token/jwt-framework /home/runner/work/web-token/jwt-framework && cd /home/runner/work/web-token/jwt-framework
15+
- name: Split repositories
16+
run: docker run --rm -t -e GH_TOKEN -v /cache/gitsplit:/cache/gitsplit -v /home/runner/work/web-token/jwt-framework:/srv jderusse/gitsplit gitsplit
17+
env:
18+
GH_TOKEN: ${{ secrets.GITSPLIT_TOKEN }}

.gitsplit.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
splits:
2+
- prefix: "src/Component/Core"
3+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-core.git"
4+
- prefix: "src/Component/Checker"
5+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-checker.git"
6+
- prefix: "src/Component/Signature"
7+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature.git"
8+
- prefix: "src/Component/Encryption"
9+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption.git"
10+
- prefix: "src/Component/KeyManagement"
11+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-key-mgmt.git"
12+
- prefix: "src/Component/Console"
13+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-console.git"
14+
- prefix: "src/Component/NestedToken"
15+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-nested-token.git"
16+
- prefix: "src/Bundle/JoseFramework"
17+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-bundle.git"
18+
- prefix: "src/EncryptionAlgorithm/ContentEncryption/AESCBC"
19+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-aescbc.git"
20+
- prefix: "src/EncryptionAlgorithm/ContentEncryption/AESGCM"
21+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-aesgcm.git"
22+
- prefix: "src/EncryptionAlgorithm/KeyEncryption/AESGCMKW"
23+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-aesgcmkw.git"
24+
- prefix: "src/EncryptionAlgorithm/KeyEncryption/AESKW"
25+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-aeskw.git"
26+
- prefix: "src/EncryptionAlgorithm/KeyEncryption/Direct"
27+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-dir.git"
28+
- prefix: "src/EncryptionAlgorithm/KeyEncryption/ECDHES"
29+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-ecdh-es.git"
30+
- prefix: "src/EncryptionAlgorithm/KeyEncryption/PBES2"
31+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-pbes2.git"
32+
- prefix: "src/EncryptionAlgorithm/KeyEncryption/RSA"
33+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-rsa.git"
34+
- prefix: "src/SignatureAlgorithm/ECDSA"
35+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature-algorithm-ecdsa.git"
36+
- prefix: "src/SignatureAlgorithm/EdDSA"
37+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature-algorithm-eddsa.git"
38+
- prefix: "src/SignatureAlgorithm/None"
39+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature-algorithm-none.git"
40+
- prefix: "src/SignatureAlgorithm/HMAC"
41+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature-algorithm-hmac.git"
42+
- prefix: "src/SignatureAlgorithm/RSA"
43+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature-algorithm-rsa.git"
44+
- prefix: "src/SignatureAlgorithm/Experimental"
45+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-signature-algorithm-experimental.git"
46+
- prefix: "src/EncryptionAlgorithm/Experimental"
47+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-encryption-algorithm-experimental.git"
48+
- prefix: "src/Ecc"
49+
target: "https://${GH_TOKEN}@github.com/web-token/jwt-util-ecc.git"
50+
- prefix: "packs/encryption"
51+
target: "https://${GH_TOKEN}@github.com/web-token/encryption-pack.git"
52+
- prefix: "packs/signature"
53+
target: "https://${GH_TOKEN}@github.com/web-token/signature-pack.git"
54+
55+
origins:
56+
- ^\d+\.\d+\.x$
57+
- ^\d+\.\d+\.\d+$

0 commit comments

Comments
 (0)