mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-03 09:54:33 +00:00
ci: add codegen to static-checks
Signed-off-by: Markus Rudy <mr@edgeless.systems> Fixes: #11631 Co-authored-by: Steve Horsman <steven@uk.ibm.com>
This commit is contained in:
committed by
Steve Horsman
parent
9e38fd2562
commit
3fd354b991
33
.github/workflows/static-checks.yaml
vendored
33
.github/workflows/static-checks.yaml
vendored
@@ -150,3 +150,36 @@ jobs:
|
|||||||
needs: skipper
|
needs: skipper
|
||||||
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
||||||
uses: ./.github/workflows/govulncheck.yaml
|
uses: ./.github/workflows/govulncheck.yaml
|
||||||
|
|
||||||
|
codegen:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
needs: skipper
|
||||||
|
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
||||||
|
permissions:
|
||||||
|
contents: read # for checkout
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
- name: generate
|
||||||
|
run: make -C src/agent generate-protocols
|
||||||
|
- name: check for diff
|
||||||
|
run: |
|
||||||
|
diff=$(git diff)
|
||||||
|
if [[ -z "${diff}" ]]; then
|
||||||
|
echo "No diff detected."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
Run \`make -C src/agent generate-protocols\` to update protobuf bindings.
|
||||||
|
|
||||||
|
\`\`\`diff
|
||||||
|
${diff}
|
||||||
|
\`\`\`
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "::error::Golang protobuf bindings need to be regenerated (see Github step summary for diff)."
|
||||||
|
exit 1
|
||||||
|
Reference in New Issue
Block a user