diff --git a/.github/workflows/check-go-mod.yml b/.github/workflows/check-go-mod.yml index 32b5fdaeca..8065fcaaeb 100644 --- a/.github/workflows/check-go-mod.yml +++ b/.github/workflows/check-go-mod.yml @@ -17,7 +17,7 @@ jobs: uses: ./.github/actions/golang - name: Test go mod - run: "make test-go-mod" + run: make test-go-mod - name: Save logs if: always() diff --git a/hack/check-go-mod.sh b/hack/check-go-mod.sh index f5dae69023..5fe9920eca 100755 --- a/hack/check-go-mod.sh +++ b/hack/check-go-mod.sh @@ -2,10 +2,12 @@ set -euo pipefail +git status + if [ -z "$(git status -s go.mod go.sum)" ]; then echo "Success!" exit 0 else - git diff go.mod go.sum + echo "failure, please run go mod tidy and commit" exit 1 fi