Skip to content

Commit 4653aa5

Browse files
authored
Merge pull request #16 from github/copilot/define-workflow-permissions
Add explicit permissions to GitHub Actions workflows
2 parents 5be7735 + ad0bfb4 commit 4653aa5

File tree

3 files changed

+2580
-1334
lines changed

3 files changed

+2580
-1334
lines changed

.github/workflows/nodejs.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
name: Node CI
22

33
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
48
jobs:
59
build:
610
runs-on: macos-latest
711
steps:
812
- uses: actions/checkout@v2
9-
- name: Use Node.js 12.x
10-
uses: actions/setup-node@v1
13+
- name: Use Node.js 20.x
14+
uses: actions/setup-node@v6
1115
with:
12-
node-version: 12.x
16+
node-version: 20.x
1317
- name: npm install, build, and test
1418
run: |
1519
npm install

.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)