Skip to content

Commit 8354b1e

Browse files
authored
Update validate.yml
1 parent 3c66187 commit 8354b1e

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/validate.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
with:
2929
fetch-depth: 0
3030

31+
# Ensure runner uses LF and does not rewrite files
32+
- name: Normalize git on runner
33+
run: |
34+
git config --global core.autocrlf false
35+
git config --global core.eol lf
36+
3137
- name: Setup Node.js
3238
uses: actions/setup-node@v4
3339
with:
@@ -46,11 +52,22 @@ jobs:
4652
- name: Generate checksums
4753
run: node scripts/generate-checksums.mjs schemas/v1.0.0 checksums.txt
4854

55+
# Helpful debug if drift occurs
56+
- name: Debug checksum drift
57+
if: always()
58+
run: |
59+
echo "::group::git status"
60+
git status --porcelain || true
61+
echo "::endgroup::"
62+
echo "::group::diff checksums.txt"
63+
git diff -- checksums.txt || true
64+
echo "::endgroup::"
65+
4966
- name: Verify checksums are current
5067
run: git diff --exit-code checksums.txt
5168

5269
- name: Upload checksums artifact (for debugging)
53-
if: always()
70+
if: failure() || cancelled()
5471
uses: actions/upload-artifact@v4
5572
with:
5673
name: checksums.txt

0 commit comments

Comments
 (0)