-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (36 loc) · 1.23 KB
/
prettier.yml
File metadata and controls
44 lines (36 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Prettier
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: prettier-${{ github.ref }}
cancel-in-progress: false
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
- name: Cache node modules
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ./node_modules
key: ${{ runner.os }}-.-node-modules-${{ hashFiles('./package-lock.json') }}
restore-keys: |
${{ runner.os }}-.-node-modules-
- name: Install Prettier
run: npm install --no-save prettier
- name: Prettify code
uses: creyD/prettier_action@8c18391fdc98ed0d884c6345f03975edac71b8f0 # v4.6
with:
prettier_options: --check **/*.{js,md,css,html}
continue-on-error: true