-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.36 KB
/
pre-commit.yml
File metadata and controls
58 lines (47 loc) · 1.36 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
name: Pre-commit Checks
"on":
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Harden runner
# v2.18.0
uses: >-
step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df
with:
egress-policy: audit
- name: Checkout
# v6.0.2
uses: >-
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Load npm version
run: echo "NPM_VERSION=$(tr -d '\n' < .npm-version)" >> "$GITHUB_ENV"
- name: Setup Node.js
# v6.3.0
uses: >-
actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: 24
cache: npm
cache-dependency-path: |
frontend/package-lock.json
backend/package-lock.json
- name: Update npm
run: npm install --global "npm@${NPM_VERSION}"
- name: Ensure SHA-pinned actions
# v5.0.3
uses: >-
zgosalvez/github-actions-ensure-sha-pinned-actions@ca46236c6ce584ae24bc6283ba8dcf4b3ec8a066
- name: Install pre-commit
run: python3 -m pip install --upgrade pre-commit
- name: Install dependencies
run: make install
- name: Run pre-commit hooks
run: make pre-commit