Skip to content

Use buf.build to manage our protobuf related activities #2736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
github: update protobuf related actions
  • Loading branch information
alessio-perugini authored and cmaglie committed Oct 21, 2024
commit ac100767989774aba2696ac8a5334e711944615e
5 changes: 2 additions & 3 deletions .github/workflows/check-markdown-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ jobs:
- name: Install Go dependencies
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1

- name: Install protoc compiler
uses: arduino/setup-protoc@v3
- uses: bufbuild/buf-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
setup_only: true

- name: Install Task
uses: arduino/setup-task@v2
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/check-mkdocs-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ jobs:
- name: Install Go dependencies
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1

- name: Install protoc compiler
uses: arduino/setup-protoc@v3
- uses: bufbuild/buf-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
setup_only: true

- name: Install Python
uses: actions/setup-python@v5
Expand Down
62 changes: 11 additions & 51 deletions .github/workflows/check-protobuf-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
- uses: bufbuild/buf-action@v1
with:
go-version: ${{ env.GO_VERSION }}

- name: Install protoc compiler
uses: arduino/setup-protoc@v3
with:
version: v26.1
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Go deps
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
setup_only: true

- name: Install Task
uses: arduino/setup-task@v2
Expand All @@ -90,43 +78,15 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Install buf (protoc linter)
# used by the protobuf breaking change detector
- name: Fetch main branch
run: |
go install github.com/bufbuild/buf/cmd/buf@v1.20.0
go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@v1.20.0
go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@v1.20.0

- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Lint protocol buffers
run: task protoc:check
git fetch origin master

check-formatting:
needs: run-determination
if: needs.run-determination.outputs.result == 'true'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Task
uses: arduino/setup-task@v2
- uses: bufbuild/buf-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

- name: Format protocol buffers
run: task protoc:format

- name: Check formatting
run: git diff --color --exit-code
pr_comment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
lint: ${{ github.event_name == 'pull_request' }}
format: ${{ github.event_name == 'pull_request' }}
breaking: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') }}
breaking_against: ".git#branch=origin/master,subdir=rpc"
5 changes: 2 additions & 3 deletions .github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ jobs:
- name: Install Go dependencies
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.4.1

- name: Install protoc compiler
uses: arduino/setup-protoc@v3
- uses: bufbuild/buf-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
setup_only: true

- name: Install Python
uses: actions/setup-python@v5
Expand Down
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