소스 검색

fix(ci) make the "dirty git tree" CI failure clearer

Print the git diff output in the step which fails.
master
Saúl Ibarra Corretgé 3 년 전
부모
커밋
d2c4e81e25
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1
    3
      .github/workflows/ci.yml

+ 1
- 3
.github/workflows/ci.yml 파일 보기

@@ -16,10 +16,8 @@ jobs:
16 16
       run: git status
17 17
     - name: Normalize lang files to ensure sorted
18 18
       run: npm run lang-sort
19
-    - name: Check git diff
20
-      run: git diff
21 19
     - name: Check if the git repository is clean
22
-      run: exit $( git status --porcelain --untracked-files=no | head -255 | wc -l )
20
+      run: $(exit $(git status --porcelain --untracked-files=no | head -255 | wc -l)) || (echo "Dirty git tree"; git diff; exit 1)
23 21
     - run: npm run lint
24 22
     - run: for file in lang/*.json; do npx --yes jsonlint -q $file || exit 1; done
25 23
     - run: make

Loading…
취소
저장