Skip to content

Commit 837a14b

Browse files
committed
chore(ci): narrow token permissions
Signed-off-by: JP-Ellis <[email protected]>
1 parent ac1f4f5 commit 837a14b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/build-cli.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ on:
1111
branches:
1212
- main
1313

14+
permissions:
15+
contents: read
16+
1417
concurrency:
1518
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
16-
cancel-in-progress: true
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1720

1821
env:
1922
STABLE_PYTHON_VERSION: '3.13'
@@ -142,10 +145,9 @@ jobs:
142145
- build-wheels
143146

144147
permissions:
148+
contents: read
145149
# Required for trusted publishing
146150
id-token: write
147-
# Required for release creation
148-
contents: write
149151

150152
steps:
151153
- name: Checkout code

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ on:
1111
branches:
1212
- main
1313

14+
permissions:
15+
contents: read
16+
1417
concurrency:
1518
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
16-
cancel-in-progress: true
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1720

1821
env:
1922
STABLE_PYTHON_VERSION: '3.13'
@@ -216,10 +219,9 @@ jobs:
216219
- build-arm64
217220

218221
permissions:
222+
contents: read
219223
# Required for trusted publishing
220224
id-token: write
221-
# Required for release creation
222-
contents: write
223225

224226
steps:
225227
- name: Checkout code

0 commit comments

Comments
 (0)