Skip to content

Commit f9bccca

Browse files
committed
Add explicit permissions for nodejs action
1 parent 1f2f50d commit f9bccca

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/nodejs.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
name: Node.js CI
22
on: [push]
3+
4+
permissions:
5+
contents: read
6+
37
jobs:
48
build:
59
runs-on: ubuntu-latest
610
steps:
7-
- uses: actions/checkout@v4
8-
- name: Use Node.js
9-
uses: actions/setup-node@v4
10-
with:
11-
node-version: 22
12-
cache: 'npm'
13-
- run: npm install
14-
- run: npm run build --if-present
15-
- run: npm test
16-
env:
17-
CI: true
11+
- uses: actions/checkout@v4
12+
- name: Use Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: 'npm'
17+
- run: npm install
18+
- run: npm run build --if-present
19+
- run: npm test
20+
env:
21+
CI: true

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
publish-npm:
912
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)