Skip to content

Commit 32c4832

Browse files
authored
Set permissions on GitHub workflows (#1)
2 parents 0730038 + 5922358 commit 32c4832

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

.github/workflows/ci.yml

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

99
jobs:
1010
build:
11+
permissions:
12+
contents: read
13+
1114
strategy:
1215
matrix:
1316
os: [ubuntu-latest, windows-latest, macos-latest]

.github/workflows/markdown-link-check.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: Check Markdown links
22

33
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
push:
5+
branches: [ "main" ]
6+
paths: "**.md"
7+
pull_request:
8+
branches: [ "main" ]
9+
paths: "**.md"
10+
11+
permissions:
12+
contents: read
813

914
jobs:
1015
markdown-link-check:

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040

4141
runs-on: ${{ matrix.os }}
4242

43+
permissions:
44+
contents: read
45+
4346
steps:
4447
- name: Clone the repo
4548
uses: actions/checkout@v4
@@ -64,6 +67,9 @@ jobs:
6467
env:
6568
version_suffix_args: ${{ github.event_name != 'release' && format('--version-suffix "{0}"', inputs.version_suffix_override || format('ci.{0}', github.run_number)) || '' }}
6669

70+
permissions:
71+
contents: read
72+
6773
steps:
6874
- uses: actions/checkout@v4
6975

@@ -89,7 +95,13 @@ jobs:
8995

9096
publish-package:
9197
needs: build-package
98+
9299
runs-on: ubuntu-latest
100+
101+
permissions:
102+
contents: read
103+
packages: write
104+
93105
steps:
94106
- uses: actions/checkout@v4
95107

0 commit comments

Comments
 (0)