Skip to content

Commit 11539f9

Browse files
committed
[ci] Make workflow permissions explicit
1 parent 7525768 commit 11539f9

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches: [ "*" ]
66
paths-ignore:
7-
- 'mkdocs.yml'
87
- 'docs/**'
98
pull_request:
109

10+
permissions:
11+
contents: read
12+
1113
jobs:
1214
build:
1315
runs-on: ${{ matrix.os }}

.github/workflows/dependabot-pr-post-processing.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7+
# We don't need any permissions here, because they are handled in the PAT.
8+
# We need the PAT because Dependabot workflows don't have enough permissions to process the PRs properly.
79
permissions:
8-
contents: write # to commit yarn.lock
9-
pull-requests: write # to label PRs
10+
contents: none
1011

1112
jobs:
1213
dependabot-pr-post-processing:

.github/workflows/publish-website.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88

99
run-name: "Website update (${{ github.ref_name }})"
1010

11+
permissions:
12+
contents: write # to push to the gh-pages branch
13+
1114
jobs:
1215
publish-website:
1316
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414

1515
run-name: "Release ${{ inputs.version }}"
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
release:
1922
runs-on: macos-latest # For darwin publications

0 commit comments

Comments
 (0)