Skip to content

Commit

Permalink
Setup buf cli to build for proto validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder committed Oct 13, 2023
1 parent 112d68a commit 6a3dc8d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish-exp-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
go-version: "1.20.6"
id: go

- uses: bufbuild/buf-setup-action@v1.27.0

- name: Extract version
shell: bash
run: echo "tag=$(echo $(git describe --abbrev=1 --tags)-$(echo ${{ inputs.name }}))" >> $GITHUB_OUTPUT
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
go-version: "1.20.6"
id: go

- uses: bufbuild/buf-setup-action@v1.27.0

- name: Extract version
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
with:
go-version: "1.20.6"
id: go
- uses: bufbuild/buf-setup-action@v1.27.0
- name: Generate code
env:
NODE_OPTIONS: "--max-old-space-size=4096"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ validate-fmt: ## Validate go format
fi

.PHONY: validate-proto
validate-proto: proto ## build proto and check if diff found
validate-proto: gen-proto ## build proto and check if diff found
git diff --quiet -- pkg/actions/actions.pb.go || (echo "Modification verification failed! pkg/actions/actions.pb.go"; false)
git diff --quiet -- pkg/auth/model/model.pb.go || (echo "Modification verification failed! pkg/auth/model/model.pb.go"; false)
git diff --quiet -- pkg/catalog/catalog.pb.go || (echo "Modification verification failed! pkg/catalog/catalog.pb.go"; false)
Expand Down

0 comments on commit 6a3dc8d

Please sign in to comment.