-
Notifications
You must be signed in to change notification settings - Fork 592
44 lines (40 loc) · 1.09 KB
/
check-generated.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
# Ensure that generated code is up-to-date.
name: Generate protobuf code
on:
workflow_dispatch:
pull_request:
paths:
- "proto/**"
- "**/**.proto"
- "**/**.pb.go"
- "**/**.sum"
- "**/client/**.go"
- "scripts/ci/**"
- "Makefile"
- "Dockerfile"
- ".github/workflows/check-generated.yml"
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
check-proto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: "Check protobuf generated code"
run: |
chmod +x ./scripts/protocgen.sh
make proto-all
make run-querygen
- name: Commit changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add *.go
git add *.proto
git commit -m "Generated protofile changes" || echo "No changes to commit"
git push