-
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@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 20
- name: Cache node modules
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.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@5e54c689403b43aac746a34c07656fd4cb71d822 # v4.5
with:
prettier_options: --check **/*.{js,md,css,html}
continue-on-error: true