Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add checking that all files are committed #565

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ jobs:

- name: Build and Test csv-generator
run: make container-build && ./tests/e2e-test-csv-generator.sh

check_commited_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check commited files
run: hack/check-commited-changes.sh
20 changes: 20 additions & 0 deletions hack/check-commited-changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

check_make() {
if ! make "$1"; then
echo "make $1 failed"
exit 1
fi
}

check_make vendor
check_make generate
check_make manifests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add check_make fmt?

check_make fmt

# check git status
status=$(git status --porcelain)
if [[ -n $status ]]; then
echo "There are uncommitted changes."
exit 1
fi
Loading