Skip to content

protocol buffer 環境を作成しました #10

protocol buffer 環境を作成しました

protocol buffer 環境を作成しました #10

Workflow file for this run

name: ci
on: pull_request
jobs:
protobuf-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_SECRET_KEY }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.2"
# 参照
# https://ubuntu.pkgs.org/20.04/ubuntu-universe-arm64/golang-goprotobuf-dev_1.3.2-2_arm64.deb.html
- name: Install Protobuf
run: |
sudo apt-get update
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
export PATH="$PATH:$(go env GOPATH)/bin"
- name: Run protoc
run: |
make generate_proto
- name: Check for changes
id: git-check
run: |
git diff --exit-code api/gen
continue-on-error: true
- name: Fail if changes are detected
if: steps.git-check.outcome == 'failure'
run: |
echo "Changes detected in api/gen directory!"
exit 1