Skip to content

Commit f48577f

Browse files
committed
ci: add explicit permissions to github workflows
- Add `contents: read` and `pull-requests: write` permissions to analyze workflow - Add `contents: read` permission to backup workflow - Add `contents: write` permission to publish workflow - Add `contents: read` permission to test workflow
1 parent ec80c1e commit f48577f

4 files changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/analyze.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- "pubspec.yaml"
1212
- ".github/workflows/analyze.yaml"
1313

14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
1418
jobs:
1519
analysis:
1620
name: 🕵️ Analyze

.github/workflows/backup.yaml

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

8+
permissions:
9+
contents: read
10+
811
jobs:
912
mirror-to-gitlab:
1013
name: 💾 Backup to GitLab

.github/workflows/publish.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
tags:
1313
- "[1-9]+.[0-9]+.[0-9]+*"
1414

15+
permissions:
16+
contents: write
17+
1518
jobs:
1619
publish-dry-run:
1720
name: 📝 Publish dry run

.github/workflows/test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
- "pubspec.yaml"
2121
- ".github/workflows/test.yaml"
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
2427
test:
2528
name: 🧪 Test

0 commit comments

Comments
 (0)