Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/proto-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Proto Generation Check

on:
pull_request:
paths:
- 'proto/**'
- 'src/generated/**'
- 'docs/api/**'
- 'Makefile'

jobs:
proto-freshness:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false

- name: Install buf and protoc plugins
run: make install-buf install-plugins
env:
GOPROXY: direct
GOPRIVATE: github.com/SebastienMelki

- name: Run proto generation
run: make generate

- name: Verify generated code is up to date
run: |
if ! git diff --exit-code src/generated/ docs/api/; then
echo ""
echo "============================================================"
echo "ERROR: Proto-generated code is out of date."
echo "Run 'make generate' locally and commit the updated files."
echo "============================================================"
exit 1
fi
echo "Proto-generated code is up to date."