Skip to content

Commit

Permalink
chore(ci): error if uncommitted changes found on build (#2339)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
castastrophe authored Dec 5, 2023
1 parent 9271456 commit c014de9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c014de9

Please sign in to comment.