Skip to content

Commit 7f765ce

Browse files
cristi-claude
andcommitted
chore: migrate submodule to s2-specs at root and add sync workflow
- Move submodule from s2-internal/src/main/proto to s2-specs at root - Update s2-internal/build.gradle.kts to use new proto source path - Add sync_specs.yaml workflow with: - peter-evans/create-pull-request@v8 - sign-commits enabled - Listens for s2-specs-update events Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 34a1929 commit 7f765ce

File tree

5 files changed

+62
-4
lines changed

5 files changed

+62
-4
lines changed

.github/workflows/sync_specs.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Sync specs submodule
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
repository_dispatch:
9+
types: [s2-specs-update]
10+
workflow_dispatch:
11+
12+
jobs:
13+
sync-specs:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: true
19+
20+
- name: Update submodule
21+
id: submodules
22+
uses: sgoudham/[email protected]
23+
with:
24+
submodules: s2-specs
25+
26+
- name: Setup Java
27+
if: ${{ steps.submodules.outputs['s2-specs--updated'] }}
28+
uses: actions/setup-java@v4
29+
with:
30+
distribution: temurin
31+
java-version: 21
32+
33+
- name: Setup Gradle
34+
if: ${{ steps.submodules.outputs['s2-specs--updated'] }}
35+
uses: gradle/actions/setup-gradle@v4
36+
37+
- name: Regenerate proto files
38+
if: ${{ steps.submodules.outputs['s2-specs--updated'] }}
39+
run: ./gradlew :s2-internal:generateProto
40+
41+
- name: Create pull request
42+
if: ${{ steps.submodules.outputs['s2-specs--updated'] }}
43+
uses: peter-evans/create-pull-request@v8
44+
with:
45+
committer: s2-helper[bot] <194906454+s2-helper[bot]@users.noreply.github.com>
46+
author: s2-helper[bot] <194906454+s2-helper[bot]@users.noreply.github.com>
47+
sign-commits: true
48+
title: "chore: sync s2-specs submodule"
49+
branch: "specs/sync-${{ steps.submodules.outputs['s2-specs--latestShortCommitSha'] }}"
50+
body: ${{ steps.submodules.outputs.prBody }}

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "proto"]
2-
path = s2-internal/src/main/proto
3-
url = https://github.com/s2-streamstore/s2-protos.git
1+
[submodule "s2-specs"]
2+
path = s2-specs
3+
url = https://github.com/s2-streamstore/s2-specs.git

s2-internal/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ dependencies {
3232
testRuntimeOnly(libs.junit.platform.launcher)
3333
}
3434

35+
sourceSets {
36+
main {
37+
proto {
38+
srcDir("../s2-specs/s2")
39+
}
40+
}
41+
}
42+
3543
val protobufVersion: String = libs.versions.protobuf.get()
3644
val grpcVersion: String = libs.versions.grpc.get()
3745
protobuf {

s2-internal/src/main/proto

Lines changed: 0 additions & 1 deletion
This file was deleted.

s2-specs

Submodule s2-specs added at e1a7889

0 commit comments

Comments
 (0)