Skip to content

Commit b97e223

Browse files
committed
ci: set up pnpm audio
1 parent 00568b8 commit b97e223

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Setup Node + pnpm
2+
description: Install pnpm, setup Node.js with pnpm cache, and install deps
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setup pnpm
7+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
8+
with:
9+
version: 10.18.3
10+
11+
- name: Setup Node.js
12+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
13+
with:
14+
node-version: 20
15+
cache: pnpm
16+
17+
- name: Install dependencies
18+
shell: bash
19+
run: pnpm install --frozen-lockfile

.github/workflows/npm-audit.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Security Checks
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
pnpm-audit:
14+
name: PNPM Audit
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
20+
- name: Setup
21+
uses: ./.github/actions/setup
22+
23+
- name: Run pnpm audit
24+
run: pnpm audit --prod --audit-level=moderate

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "toolhive-cloud-ui",
33
"version": "0.1.0",
44
"private": true,
5+
"packageManager": "[email protected]",
56
"scripts": {
67
"dev": "next dev",
78
"build": "next build",

0 commit comments

Comments
 (0)