fix(ci): errors when running on push

all files will be prettified now when running on push, only changed when running on PR

!nuf
This commit is contained in:
Miodec 2024-08-05 20:23:16 +02:00
parent a558a59a5a
commit 749f2af10b

View file

@ -131,6 +131,7 @@ jobs:
run: pnpm add -g prettier@2.5.1
- name: Get changed files
if: github.event_name == 'pull_request'
id: get-changed-files
uses: actions/github-script@v7
with:
@ -146,6 +147,7 @@ jobs:
return changedFiles.map(file => file.filename).join(' ');
- name: Check pretty (changed files)
if: github.event_name == 'pull_request'
id: check-pretty
run: |
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
@ -153,6 +155,10 @@ jobs:
pnpm prettier --check $CHANGED_FILES
fi
- name: Check pretty (all files)
if: github.event_name == 'push'
run: pnpm prettier --check .
ci-be:
name: ci-be
needs: [pre-ci, prime-cache, check-pretty]