Skip to content

Commit 4689ff0

Browse files
authored
ci: initial draft of gitsplit replacement (#73)
* ci: initial draft of gitsplit replacement Fixes: #55 Signed-off-by: Tom Carrio <[email protected]> * refactor: target specific release tag name and break out jobs for each split Signed-off-by: Tom Carrio <[email protected]> --------- Signed-off-by: Tom Carrio <[email protected]>
1 parent 3595582 commit 4689ff0

File tree

7 files changed

+121
-121
lines changed

7 files changed

+121
-121
lines changed

Diff for: .github/workflows/split_monorepo.yaml

+121-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,131 @@
11
name: gitsplit
22
on:
3-
push:
4-
branches:
5-
- main
6-
- split
73
release:
84
types: [published]
9-
create:
10-
workflow_dispatch:
115

126
jobs:
13-
gitsplit:
7+
split-hook-dd-trace:
148
runs-on: ubuntu-latest
159
steps:
1610
- name: checkout
17-
run: git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout $GITHUB_SHA
18-
- name: Split repositories
19-
uses: docker://jderusse/gitsplit:latest
11+
run: git clone "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout "$GITHUB_SHA"
12+
- uses: dorny/paths-filter@v2
13+
id: filter
2014
with:
21-
args: gitsplit
22-
env:
23-
GH_TOKEN: ${{ secrets.GITSPLIT_TOKEN }}
15+
filters: |
16+
src:
17+
- 'hooks/DDTrace/**'
18+
- name: push-hook-dd-trace
19+
uses: wmde/git-filter-repo-docker-action@v1
20+
if: steps.filter.outputs.workflows == 'true'
21+
with:
22+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
23+
targetOrg: open-feature-php
24+
targetRepo: dd-trace-hook
25+
targetBranch: ${{ github.event.release.tag_name }}
26+
filterArguments: '--subdirectory-filter hooks/DDTrace/'
27+
28+
split-hook-otel:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: checkout
32+
run: git clone "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout "$GITHUB_SHA"
33+
- uses: dorny/paths-filter@v2
34+
id: filter
35+
with:
36+
filters: |
37+
src:
38+
- 'hooks/OpenTelemetry/**'
39+
- name: push-hook-otel
40+
uses: wmde/git-filter-repo-docker-action@v1
41+
if: steps.filter.outputs.workflows == 'true'
42+
with:
43+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
44+
targetOrg: open-feature-php
45+
targetRepo: otel-hook
46+
targetBranch: ${{ github.event.release.tag_name }}
47+
filterArguments: '--subdirectory-filter hooks/OpenTelemetry/'
48+
49+
split-hook-validator:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: checkout
53+
run: git clone "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout "$GITHUB_SHA"
54+
- uses: dorny/paths-filter@v2
55+
id: filter
56+
with:
57+
filters: |
58+
src:
59+
- 'hooks/Validators/**'
60+
- name: push-hook-validator
61+
uses: wmde/git-filter-repo-docker-action@v1
62+
if: steps.filter.outputs.workflows == 'true'
63+
with:
64+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
65+
targetOrg: open-feature-php
66+
targetRepo: validators-hook
67+
targetBranch: ${{ github.event.release.tag_name }}
68+
filterArguments: '--subdirectory-filter hooks/Validators/'
69+
70+
split-provider-cloudbees:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: checkout
74+
run: git clone "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout "$GITHUB_SHA"
75+
- uses: dorny/paths-filter@v2
76+
id: filter
77+
with:
78+
filters: |
79+
src:
80+
- 'providers/CloudBees/**'
81+
- name: push-provider-cloudbees
82+
uses: wmde/git-filter-repo-docker-action@v1
83+
if: steps.filter.outputs.workflows == 'true'
84+
with:
85+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
86+
targetOrg: open-feature-php
87+
targetRepo: cloudbees-provider
88+
targetBranch: ${{ github.event.release.tag_name }}
89+
filterArguments: '--subdirectory-filter providers/CloudBees/'
90+
91+
split-provider-flagd:
92+
runs-on: ubuntu-latest
93+
steps:
94+
- name: checkout
95+
run: git clone "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout "$GITHUB_SHA"
96+
- uses: dorny/paths-filter@v2
97+
id: filter
98+
with:
99+
filters: |
100+
src:
101+
- 'providers/Flagd/**'
102+
- name: push-provider-flagd
103+
uses: wmde/git-filter-repo-docker-action@v1
104+
if: steps.filter.outputs.workflows == 'true'
105+
with:
106+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
107+
targetOrg: open-feature-php
108+
targetRepo: flagd-provider
109+
targetBranch: ${{ github.event.release.tag_name }}
110+
filterArguments: '--subdirectory-filter providers/Flagd/'
111+
112+
split-provider-split:
113+
runs-on: ubuntu-latest
114+
steps:
115+
- name: checkout
116+
run: git clone "$GITHUB_SERVER_URL"/"$GITHUB_REPOSITORY" "$GITHUB_WORKSPACE" && cd "$GITHUB_WORKSPACE" && git checkout "$GITHUB_SHA"
117+
- uses: dorny/paths-filter@v2
118+
id: filter
119+
with:
120+
filters: |
121+
src:
122+
- 'providers/Split/**'
123+
- name: push-provider-split
124+
uses: wmde/git-filter-repo-docker-action@v1
125+
if: steps.filter.outputs.workflows == 'true'
126+
with:
127+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
128+
targetOrg: open-feature-php
129+
targetRepo: split-provider
130+
targetBranch: ${{ github.event.release.tag_name }}
131+
filterArguments: '--subdirectory-filter providers/Split/'

Diff for: hooks/DDTrace/.github/workflows/release-please.yml

-18
This file was deleted.

Diff for: hooks/OpenTelemetry/.github/workflows/release-please.yml

-18
This file was deleted.

Diff for: hooks/Validators/.github/workflows/release-please.yml

-18
This file was deleted.

Diff for: providers/CloudBees/.github/workflows/release-please.yml

-18
This file was deleted.

Diff for: providers/Flagd/.github/workflows/release-please.yml

-18
This file was deleted.

Diff for: providers/Split/.github/workflows/release-please.yml

-18
This file was deleted.

0 commit comments

Comments
 (0)