diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index e1a08f61..5bb91f52 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -20,7 +20,7 @@ jobs: - run: make check-proto-lint - run: make check-proto-format - run: make check-proto-breaking-remote - - run: BUF_CHECK_BREAKING_AGAINST="branch=$GITHUB_BASE_REF" make check-proto-breaking-remote + - run: BUF_CHECK_BREAKING_AGAINST_REMOTE="branch=$GITHUB_BASE_REF" make check-proto-breaking-remote if: github.event_name == 'pull_request' - run: make check-proto-gen - run: make check-proto-gen-doc diff --git a/build/proto.mk b/build/proto.mk index 6f77fc21..9fab8de5 100644 --- a/build/proto.mk +++ b/build/proto.mk @@ -44,6 +44,7 @@ check-proto-format: proto-format @git diff --exit-code proto/**/*.proto > /dev/null || (echo "Protobuf format is not up to date! Please run \`make proto-format\`."; exit 1) BUF_CHECK_BREAKING_AGAINST ?= ref=HEAD~1 +BUF_CHECK_BREAKING_AGAINST_REMOTE ?= branch=$(GIT_BRANCH),$(BUF_CHECK_BREAKING_AGAINST) .PHONY: check-proto-breaking check-proto-breaking: install-build-deps @@ -53,7 +54,7 @@ check-proto-breaking: install-build-deps .PHONY: check-proto-breaking-remote check-proto-breaking-remote: install-build-deps @echo "Checking for proto backward compatibility" - @$(BUF) breaking --against '$(HTTPS_GIT)#$(BUF_CHECK_BREAKING_AGAINST)' + $(BUF) breaking --against '$(HTTPS_GIT)#$(BUF_CHECK_BREAKING_AGAINST_REMOTE)' .PHONY: proto-gen-all proto-gen-all: proto-gen proto-gen-doc proto-gen-swagger