File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,10 +36,17 @@ jobs:
3636 runs-on : ubuntu-latest
3737 steps :
3838 - uses : actions/checkout@v6
39+ with :
40+ path : gateway
41+ - uses : actions/checkout@v6
42+ with :
43+ repository : nantian-gw/proto
44+ path : proto
45+ token : ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
3946 - uses : actions/setup-go@v6
4047 with :
41- go-version-file : go.mod
42- cache-dependency-path : go.sum
48+ go-version-file : gateway/ go.mod
49+ cache-dependency-path : gateway/ go.sum
4350 - name : Install Buf CLI
4451 env :
4552 BUF_VERSION : 1.70.0
@@ -52,15 +59,19 @@ jobs:
5259 - name : Buf generate
5360 env :
5461 BUF_TOKEN : ${{ secrets.BUF_TOKEN }}
55- run : buf generate buf.build/nantian/proto
62+ run : |
63+ cd gateway
64+ buf generate ../proto
5665 - name : Verify go mod tidy
5766 run : |
67+ cd gateway
5868 go mod tidy
5969 git diff --exit-code
6070 - name : Verify generated code is up to date
6171 run : |
72+ cd gateway
6273 if ! git diff --exit-code gen/; then
63- echo "::error::Generated Go code is out of date. Run 'buf generate buf.build/nantian /proto && go mod tidy' locally and commit the changes."
74+ echo "::error::Generated Go code is out of date. Run 'buf generate .. /proto && go mod tidy' locally and commit the changes."
6475 exit 1
6576 fi
6677
You can’t perform that action at this time.
0 commit comments