-
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@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 20
- name: Cache node modules
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
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