Skip to content

Commit 471ba28

Browse files
authored
chore: Add permissions to all workflows (#304)
1 parent 489f66f commit 471ba28

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
runs-on: ubuntu-latest
1417
steps:
1518
- uses: actions/checkout@v5
1619
- uses: actions/setup-node@v5
1720
with:
18-
node-version: '22'
19-
cache: 'npm'
21+
node-version: "22"
22+
cache: "npm"
2023

2124
- name: Install dependencies
2225
run: npm ci
@@ -31,14 +34,13 @@ jobs:
3134
- uses: actions/checkout@v5
3235
- uses: actions/setup-node@v5
3336
with:
34-
node-version: '22'
35-
cache: 'npm'
37+
node-version: "22"
38+
cache: "npm"
3639

3740
- name: Install dependencies
3841
run: npm ci
3942

40-
-
41-
# Required for the package command tests to work
43+
- # Required for the package command tests to work
4244
name: Set up Docker Buildx
4345
uses: docker/setup-buildx-action@v3
4446

@@ -52,8 +54,8 @@ jobs:
5254
- uses: actions/checkout@v5
5355
- uses: actions/setup-node@v5
5456
with:
55-
node-version: '22'
56-
cache: 'npm'
57+
node-version: "22"
58+
cache: "npm"
5759

5860
- name: Install dependencies
5961
run: npm ci
@@ -68,8 +70,8 @@ jobs:
6870
- uses: actions/checkout@v5
6971
- uses: actions/setup-node@v5
7072
with:
71-
node-version: '22'
72-
cache: 'npm'
73+
node-version: "22"
74+
cache: "npm"
7375

7476
- name: Install dependencies
7577
run: npm ci

.github/workflows/pr_title.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- edited
88
- synchronize
99

10+
permissions:
11+
pull-requests: read
12+
1013
jobs:
1114
main:
1215
name: Validate PR title
@@ -41,7 +44,7 @@ jobs:
4144
# special "[WIP]" prefix to indicate this state. This will avoid the
4245
# validation of the PR title and the pull request checks remain pending.
4346
# Note that a second check will be reported if this is enabled.
44-
wip: true
47+
wip: false
4548
# When using "Squash and merge" on a PR with only one commit, GitHub
4649
# will suggest using that commit message instead of the PR title for the
4750
# merge commit, and it's easy to commit this by mistake. Enable this option

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
tags:
55
- "v*.*.*"
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
publish:
912
name: Publish to npm

.github/workflows/release_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches:
55
- main
66

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

0 commit comments

Comments
 (0)