Debian Codegraph @

.github/workflows/generate.yml

raw
1 #
2 # Copyright 2022 The Sigstore Authors.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 name: Check generated code for changes
17
18 permissions:
19 contents: read
20
21 on:
22 push:
23 branches: [main]
24 pull_request: {}
25
26 jobs:
27 check_generated_protos:
28 name: Check generated protobufs
29 runs-on: ubuntu-latest
30
31 steps:
32 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33 with:
34 persist-credentials: false
35
36 # clear out the generated files directory so we know we are actually
37 # generating all the files again (instead of a subset)
38 - name: Clear out protobuf directory
39 run: |
40 make clean
41
42 - name: Compile protobufs
43 run: |
44 make all
45
46 - name: Ensure no files were modified as a result of the codegen
47 run: git update-index --refresh && git diff-index --quiet HEAD -- || git diff --exit-code