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

.github/workflows/check-protobuf-task.yml

Lines changed: 7 additions & 51 deletions
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/protoc-gen-go@v1.34.2
70-
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
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/buf@v1.20.0
101-
go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@v1.20.0
102-
go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@v1.20.0
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy