-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5808bc
commit 359d416
Showing
3 changed files
with
64 additions
and
40 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 |
---|---|---|
|
@@ -9,32 +9,54 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.22.0' | ||
|
||
- name: Install dependencies | ||
run: | | ||
go install github.com/golang/protobuf/protoc-gen-go | ||
go install google.golang.org/grpc | ||
- name: Regenerate protobuf files | ||
run: | | ||
task proto:all | ||
- name: Configure git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Commit and push changes | ||
run: | | ||
git add . | ||
git commit -m "Regenerate protobuf files" | ||
git push origin HEAD:${{ github.event.pull_request.head.ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.22.0" | ||
|
||
- name: Install task CLI | ||
run: | | ||
TASK_VERSION=3.39.0 | ||
curl -sL https://github.com/go-task/task/releases/download/v${TASK_VERSION}/task_linux_amd64.tar.gz | tar -xz -C /usr/local/bin task | ||
- name: Install protoc | ||
run: | | ||
PROTOC_VERSION=28.1 | ||
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip | ||
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc3 | ||
sudo mv protoc3/bin/* /usr/local/bin/ | ||
sudo mv protoc3/include/* /usr/local/include/ | ||
rm -rf protoc3 protoc-${PROTOC_VERSION}-linux-x86_64.zip | ||
- name: Install dependencies | ||
run: | | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
- name: Regenerate protobuf files | ||
run: | | ||
task proto:all | ||
- name: Configure git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
# - name: Commit and push changes | ||
# run: | | ||
# git add . | ||
# git commit -m "Regenerate protobuf files" | ||
# git push origin HEAD:${{ github.event.pull_request.head.ref }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: peter-evans/create-pull-request@v7 | ||
with: | ||
base: ${{ github.head_ref }} | ||
# sign-commits: true | ||
commit-message: update protobuf generated golang code | ||
title: Update generated code | ||
branch: ${{ github.event.pull_request.head.ref }} |
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# Stash unstaged changes | ||
git stash --keep-index --include-untracked | ||
# # Stash unstaged changes | ||
# git stash --keep-index --include-untracked | ||
|
||
# Regenerate the proto files | ||
task proto:all | ||
# # Regenerate the proto files | ||
# task proto:all | ||
|
||
# Add only the generated .pb.go files | ||
find . -name "*.pb.go" -exec git add {} + | ||
# # Add only the generated .pb.go files | ||
# find . -name "*.pb.go" -exec git add {} + | ||
|
||
# Restore stashed changes | ||
git stash pop | ||
# # Restore stashed changes | ||
# git stash pop | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
golang 1.22.2 | ||
task 3.35.1 | ||
protoc 25.3 | ||
protoc-gen-go-grpc 1.3.0 | ||
protoc-gen-go 1.29.0 | ||
protoc 28.1 | ||
protoc-gen-go-grpc 1.5.1 | ||
protoc-gen-go 1.34.2 | ||
nodejs 20.13.1 | ||
pnpm 9.6.0 |