ci(prettier): show diff if prettier made changes (#30798)

This commit is contained in:
Oluf Lorenzen 2024-08-19 15:16:46 +02:00 committed by GitHub
parent 3681b2a945
commit 463f8f2ded
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -260,7 +260,13 @@ jobs:
key: prettier-main-cache
- name: Lint
run: pnpm prettier --cache-location .cache/prettier
run: |
pnpm prettier --write --cache-location .cache/prettier
git diff --quiet || {
echo "[ERROR] Please apply the changes prettier suggests:"
git diff --color=always
exit 1
}
- name: Remove cache
if: github.event_name == 'push'