Skip to content

Commit

Permalink
ci: fix linting jobs diff check
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Nov 8, 2023
1 parent 95824b6 commit 0324e8a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ jobs:
go-version: "1.20"

- run: go mod tidy
- run: |
if ! git diff --exit-code; then
echo "::error::Found changes in code, don't forget to run 'go mod tidy' before you commit."
fi

- run: git diff --exit-code

- if: failure()
run: echo "::error::Found changes in code, don't forget to run 'go mod tidy' before you commit."

check-generate:
runs-on: ubuntu-latest
Expand All @@ -45,7 +46,8 @@ jobs:
go-version: "1.20"

- run: make generate
- run: |
if ! git diff --exit-code; then
echo "::error::Found changes in generated code, don't forget to run 'make generate' before you commit."
fi

- run: git diff --exit-code

- if: failure()
run: echo "::error::Found changes in generated code, don't forget to run 'make generate' before you commit."

0 comments on commit 0324e8a

Please sign in to comment.