mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 07:16:17 +08:00
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:
parent
a558a59a5a
commit
749f2af10b
6
.github/workflows/monkey-ci.yml
vendored
6
.github/workflows/monkey-ci.yml
vendored
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue