From 123cf3d41f34d7b385042c5d4db649d6ee738318 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 5 Feb 2024 13:13:01 -0500 Subject: [PATCH] Managed by Terraform: Update go-validate.yml GitHub workflow --- .github/workflows/go-validate.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-validate.yml b/.github/workflows/go-validate.yml index 7765a187..aef23cdc 100644 --- a/.github/workflows/go-validate.yml +++ b/.github/workflows/go-validate.yml @@ -84,6 +84,13 @@ jobs: - run: | export PATH=$PATH:$(go env GOPATH)/bin make generate - git diff --exit-code || ( echo "Found diffs in generated code" \ - && echo "You can use the command: \`make generate\` to reformat code." \ - && false ) + uncommitted="$(git status -s)" + if [[ -z "$uncommitted" ]]; then + echo "OK" + else + echo "Docs have been updated, but the compiled docs have not been committed." + echo "Run 'make generate', and commit the result to resolve this error." + echo "Generated but uncommitted files:" + echo "$uncommitted" + exit 1 + fi