Skip to content

Commit 9fbc31d

Browse files
authored
Merge pull request #1970 from pi-hole/gha-perms
Add explicit permission to workflows
2 parents 4cec89b + c97651f commit 9fbc31d

File tree

8 files changed

+27
-0
lines changed

8 files changed

+27
-0
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
release:
99
types: [published]
1010

11+
permissions:
12+
contents: read
13+
packages: write
1114

1215
env:
1316
dockerhub: ${{ secrets.DOCKERHUB_NAMESPACE }}/pihole

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build Image and Test
22
on:
33
pull_request:
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build-and-test:
710
runs-on: ${{ matrix.runner }}

.github/workflows/codespell.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
pull_request:
44
types: [opened, synchronize, reopened, ready_for_review]
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
spell-check:
811
if: github.event.pull_request.draft == false

.github/workflows/editorconfig.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
pull_request:
44
types: [opened, synchronize, reopened, ready_for_review]
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
editorconfig-checker:
811
if: github.event.pull_request.draft == false

.github/workflows/housekeeping.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
schedule:
55
- cron: "0 0 * * *"
66

7+
permissions:
8+
packages: write
9+
710
jobs:
811
housekeeping:
912
runs-on: ubuntu-latest

.github/workflows/merge-conflict.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
pull_request_target:
99
types: [synchronize]
1010

11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
1115
jobs:
1216
main:
1317
runs-on: ubuntu-latest

.github/workflows/stale.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
workflow_dispatch:
77
issue_comment:
88

9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
913
env:
1014
stale_label: stale
1115

.github/workflows/sync-back-to-dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
812
jobs:
913
sync-branches:
1014
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)