Skip to content

Commit

Permalink
Add codegen check workflow
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 committed Apr 13, 2022
1 parent e18eff0 commit ed85c6d
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 ed85c6d

Please sign in to comment.