Skip to content

Commit 8f8fd5b

Browse files
github: update protobuf related actions
1 parent 365cab9 commit 8f8fd5b

File tree

1 file changed

+7
-51
lines changed

1 file changed

+7
-51
lines changed

Diff for: .github/workflows/check-protobuf-task.yml

+7-51
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,9 @@ jobs:
5353
- name: Checkout repository
5454
uses: actions/checkout@v4
5555

56-
- name: Install Go
57-
uses: actions/setup-go@v5
56+
- uses: bufbuild/buf-action@v1
5857
with:
59-
go-version: ${{ env.GO_VERSION }}
60-
61-
- name: Install protoc compiler
62-
uses: arduino/setup-protoc@v3
63-
with:
64-
version: v26.1
65-
repo-token: ${{ secrets.GITHUB_TOKEN }}
66-
67-
- name: Install Go deps
68-
run: |
69-
go install google.golang.org/protobuf/cmd/[email protected]
70-
go install google.golang.org/grpc/cmd/[email protected]
58+
setup_only: true
7159

7260
- name: Install Task
7361
uses: arduino/setup-task@v2
@@ -90,43 +78,11 @@ jobs:
9078
- name: Checkout repository
9179
uses: actions/checkout@v4
9280

93-
- name: Install Go
94-
uses: actions/setup-go@v5
95-
with:
96-
go-version: ${{ env.GO_VERSION }}
97-
98-
- name: Install buf (protoc linter)
81+
# used by the protobuf breaking change detector
82+
- name: Fetch main branch
9983
run: |
100-
go install github.com/bufbuild/buf/cmd/[email protected]
101-
go install github.com/bufbuild/buf/cmd/[email protected]
102-
go install github.com/bufbuild/buf/cmd/[email protected]
103-
104-
- name: Install Task
105-
uses: arduino/setup-task@v2
106-
with:
107-
repo-token: ${{ secrets.GITHUB_TOKEN }}
108-
version: 3.x
109-
110-
- name: Lint protocol buffers
111-
run: task protoc:check
84+
git fetch origin master
11285
113-
check-formatting:
114-
needs: run-determination
115-
if: needs.run-determination.outputs.result == 'true'
116-
runs-on: ubuntu-latest
117-
118-
steps:
119-
- name: Checkout repository
120-
uses: actions/checkout@v4
121-
122-
- name: Install Task
123-
uses: arduino/setup-task@v2
86+
- uses: bufbuild/buf-action@v1
12487
with:
125-
repo-token: ${{ secrets.GITHUB_TOKEN }}
126-
version: 3.x
127-
128-
- name: Format protocol buffers
129-
run: task protoc:format
130-
131-
- name: Check formatting
132-
run: git diff --color --exit-code
88+
breaking_against: ".git#branch=origin/master,subdir=rpc"

0 commit comments

Comments
 (0)