Skip to content

fix

fix #2568

name: Check Code Style
on:
push:
pull_request:
jobs:
default:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
cache: "yarn"
- name: Restore
uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
- name: Bootstrap
run: |
yarn
- name: Changed Files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: "packages/**/*.{js,cjs,mjs,jsx,ts,tsx,css,scss}"
- name: Prettier Check
if: steps.changed-files.outputs.any_changed == 'true'
run: |
yarn prettier --check ${{ steps.changed-files.outputs.all_changed_files }}