-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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