-
Notifications
You must be signed in to change notification settings - Fork 392
70 lines (69 loc) · 2.44 KB
/
generated-files.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
with:
fetch-depth: 0
- 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"
if ${{ github.event_name == 'push' }}; then
make -C api check-breaking EXTRA_BUF_FLAGS="--error-format=github-actions" BUF_BREAKING_AGAINST_BRANCH="origin/${{ github.ref_name }}"
else
make -C api check-breaking EXTRA_BUF_FLAGS="--error-format=github-actions" BUF_BREAKING_AGAINST_BRANCH="origin/${{ github.base_ref }}"
fi
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
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.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
if ${{ github.event_name == 'push' }}; then
make codegen BUF_BREAKING_AGAINST_BRANCH="origin/${{ github.ref_name }}"
else
make codegen BUF_BREAKING_AGAINST_BRANCH="origin/${{ github.base_ref }}"
fi
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