Skip to content

api: build using buf #11419

api: build using buf

api: build using buf #11419

name: Validate that generated files are up to date
on:
push:
branches:
- main
- v*
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Lint protobuf
run: |
# TODO: enable linting once we have a chance to fix the underlying issues
# make -C api lint EXTRA_BUF_FLAGS="--error-format=github-actions"
make -C api check-breaking EXTRA_BUF_FLAGS="--error-format=github-actions"
make -C api format EXTRA_BUF_FLAGS="--exit-code --error-format=github-actions"
generated-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
# renovate: datasource=golang-version depName=go
go-version: "1.23.5"
- name: Go version
run: go version
- name: Validate that generated files are up to date.
run: |
make generate
make codegen
git status
git diff
test -z "$(git status --porcelain)"
if [ $? != 0 ]; then
git status --porcelain
echo "Please run 'make generate && make codegen' and submit your changes."; exit 1
fi
- name: Check Tetragon daemon flags
run: |
make generate-flags
git status
git diff
test -z "$(git status --porcelain)"
if [ $? != 0 ]; then
git status --porcelain
echo "Please run 'make generate-flags' and submit your changes'"; exit 1
fi
- name: Check metrics docs
run: |
make lint-metrics-md