Skip to content

Commit dc2c67a

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

File tree

4 files changed

+17
-60
lines changed

4 files changed

+17
-60
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ jobs:
116116
- name: Install Go dependencies
117117
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1
118118

119-
- name: Install protoc compiler
120-
uses: arduino/setup-protoc@v3
119+
- uses: bufbuild/buf-action@v1
121120
with:
122-
repo-token: ${{ secrets.GITHUB_TOKEN }}
121+
setup_only: true
123122

124123
- name: Install Task
125124
uses: arduino/setup-task@v2

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

Lines changed: 2 additions & 3 deletions
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/protoc-gen-doc@v1.4.1
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

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

Lines changed: 11 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,15 @@ 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+
pr_comment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
89+
lint: ${{ github.event_name == 'pull_request' }}
90+
format: ${{ github.event_name == 'pull_request' }}
91+
breaking: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') }}
92+
breaking_against: ".git#branch=origin/master,subdir=rpc"

.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ jobs:
6464
- name: Install Go dependencies
6565
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1
6666

67-
- name: Install protoc compiler
68-
uses: arduino/setup-protoc@v3
67+
- uses: bufbuild/buf-action@v1
6968
with:
70-
repo-token: ${{ secrets.GITHUB_TOKEN }}
69+
setup_only: true
7170

7271
- name: Install Python
7372
uses: actions/setup-python@v5

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