From c014de98eb5db12b0976cf2dc4353faa5ea7b7c1 Mon Sep 17 00:00:00 2001 From: "[ Cassondra ]" Date: Tue, 5 Dec 2023 11:53:02 -0500 Subject: [PATCH] chore(ci): error if uncommitted changes found on build (#2339) When uncommitted assets are detected during the CI build workflow, the workflow throws a failure. Users can investigate the log for that workflow to see which assets were altered during the build. --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e01d90730b0..e346ade6534 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,3 +132,16 @@ jobs: # this is important, it lets us catch if the build failed silently # by alterting us that no compiled assets were generated if-no-files-found: error + + # This step will evaluate the repo status and report the change + - name: Check if there are changes + shell: bash + run: | + if [[ -z $(git status --porcelain) ]]; then + echo "No changes detected" + exit 0 + else + echo "Changes detected" + git status + exit 1 + fi