chore: pdf ファイルの差分を表示するエンドポイントを作成しました #25
Workflow file for this run
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
name: ci | |
on: pull_request | |
jobs: | |
protobuf-check: | |
runs-on: ubuntu-latest | |
env: | |
PROTOBUF_VERSION: "25.0" | |
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://grpc.io/docs/languages/go/quickstart/ | |
- name: Install Protobuf | |
run: | | |
wget https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/protoc-$PROTOBUF_VERSION-linux-x86_64.zip | |
unzip protoc-$PROTOBUF_VERSION-linux-x86_64.zip -d protoc-$PROTOBUF_VERSION-linux-x86_64 | |
sudo mv protoc-$PROTOBUF_VERSION-linux-x86_64/bin/protoc /usr/local/bin/protoc | |
sudo mv protoc-$PROTOBUF_VERSION-linux-x86_64/include/* /usr/local/include/ | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@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 |