Skip to content
Open
Changes from 1 commit
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
27 changes: 27 additions & 0 deletions .github/workflows/generated-code-matches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check generated protobufs
on:
pull_request:
push:
jobs:
verify-buf:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Set up buf
uses: bufbuild/buf-setup-action@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium generated

Unpinned 3rd party Action 'Verify generated protobufs' step
Uses Step
uses 'bufbuild/buf-setup-action' with ref 'v1', not a pinned commit hash
with:
version: latest
- name: Run code generation
run: |
make generate-buf
- name: Check for uncommitted changes
run: |
if ! git diff --exit-code; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think writing a new uncommitted file won't fail this.

echo "Generated protobuf files don't match. Running 'make generate-buf' should fix the issue."
exit 1
fi
Loading