Skip to content

Commit

Permalink
Add codegen check workflow (#347)
Browse files Browse the repository at this point in the history
Make sure that the generated clients are up to date.
  • Loading branch information
afritzler authored Apr 13, 2022
1 parent 30d6a72 commit c303def
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/check-codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check Codegen

on:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'

jobs:
check-codegen:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Run make generate
run: make generate
- name: Compare the expected and actual generated/* directories
run: |
if [ "$(git diff --ignore-space-at-eol generated/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. Consider running 'make generate'."
echo "See status below:"
git diff
exit 1
fi

0 comments on commit c303def

Please sign in to comment.