Skip to content

Commit 9496a56

Browse files
github: update protobuf related actions
1 parent 365cab9 commit 9496a56

File tree

2 files changed

+10
-54
lines changed

2 files changed

+10
-54
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ jobs:
4444
- name: Install Go dependencies
4545
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]
4646

47-
- name: Install protoc compiler
48-
uses: arduino/setup-protoc@v3
47+
- uses: bufbuild/buf-action@v1
4948
with:
50-
repo-token: ${{ secrets.GITHUB_TOKEN }}
49+
setup_only: true
5150

5251
- name: Install Python
5352
uses: actions/setup-python@v5

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

+8-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,12 @@ 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"
89+
pr_comment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}

0 commit comments

Comments
 (0)