-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: update protobuf related actions
- Loading branch information
1 parent
365cab9
commit 9496a56
Showing
2 changed files
with
10 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,10 +44,9 @@ jobs: | |
- name: Install Go dependencies | ||
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected] | ||
|
||
- 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
setup_only: true | ||
|
||
- name: Install Task | ||
uses: arduino/setup-task@v2 | ||
|
@@ -90,43 +78,12 @@ 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/[email protected] | ||
go install github.com/bufbuild/buf/cmd/[email protected] | ||
go install github.com/bufbuild/buf/cmd/[email protected] | ||
- 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 | ||
breaking_against: ".git#branch=origin/master,subdir=rpc" | ||
pr_comment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} |