File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 4444 run : make modtidy check-diff
4545 - name : Run go mod tidy
4646 run : make modtidy
47+
48+ - name : Install Buf CLI
49+ uses : bufbuild/buf-setup-action@v1.50.0
50+
51+ - name : Run make proto check diff
52+ run : make proto-check-diff
Original file line number Diff line number Diff line change @@ -64,9 +64,21 @@ modtidy:
6464
6565.PHONY : proto
6666proto :
67- rm -rf ./internal/proto/*
68- buf generate \
67+ @ rm -rf ./internal/proto/*
68+ @ buf generate \
6969 --template buf.gen.yaml \
7070 --path dapr/proto/common/v1 \
7171 --path dapr/proto/runtime/v1 \
7272 ' https://github.com/dapr/dapr.git'
73+
74+ PROTO_PATH := internal/proto
75+ .PHONY : proto-check-diff
76+ proto-check-diff :
77+ @$(MAKE ) proto
78+ @# single‐shell if…then…fi block
79+ @if ! git diff --quiet -- $(PROTO_PATH ) ; then \
80+ echo " ::error ::Proto files are out of date. Please run 'make proto' and commit the changes." ; \
81+ git --no-pager diff -- $(PROTO_PATH ) ; \
82+ exit 1; \
83+ fi
84+
You can’t perform that action at this time.
0 commit comments