Skip to content

Commit a9e4a84

Browse files
committed
feat(.github): Check for diffs after build
Build should not generate any diffs or untracked files. Signed-off-by: Manish Vachharajani <[email protected]>
1 parent 836f2aa commit a9e4a84

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/dev.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,25 @@ jobs:
161161
target=x86_64-unknown-linux-gnu \
162162
push-container
163163
164+
- name: "Check for uncommitted changes"
165+
run: |
166+
git diff --exit-code
167+
if [ $? -ne 0 ]; then
168+
echo "::error::Uncommitted changes detected:"
169+
git diff
170+
exit 1
171+
fi
172+
echo "No uncommitted changes found"
173+
174+
- name: "Check for untracked files"
175+
run: |
176+
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
177+
echo "::error::Untracked files detected:"
178+
git ls-files --others --exclude-standard
179+
exit 1
180+
fi
181+
echo "No untracked files found"
182+
164183
- name: "print container image name"
165184
if: ${{ matrix.profile.sterile == 'sterile' && (matrix.profile.name == 'release' || matrix.profile.name == 'debug') }}
166185
run: |

0 commit comments

Comments
 (0)