Skip to content

Commit dfce449

Browse files
committed
ci: add explicit workflow permissions to jobs
1 parent cf33c8e commit dfce449

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.github/workflows/pr.yml

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

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
format:
1114
name: Format

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
build:
1111
name: Build
1212
runs-on: ubuntu-22.04
13+
permissions:
14+
contents: write
1315
steps:
1416
- name: Checkout
1517
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
pull_request_target:
1111
branches: [ main ]
1212
merge_group:
13+
14+
permissions:
15+
contents: read
16+
1317
jobs:
1418
approve:
1519
# Note: Use approval as a job so that the downstream jobs are only prompted once (if more than 1 matrix job is defined)
@@ -28,6 +32,11 @@ jobs:
2832
environment:
2933
name: Test Auto
3034
runs-on: ubuntu-22.04
35+
permissions:
36+
# Required to publish system test results to the PR
37+
issues: write
38+
pull-requests: write
39+
contents: read
3140
env:
3241
COMPOSE_PROJECT_NAME: ci_${{github.run_id}}_${{github.run_attempt || '1'}}
3342
DEVICE_ID: ci_${{github.run_id}}_${{github.run_attempt || '1'}}

0 commit comments

Comments
 (0)