Skip to content

Commit ab9dc55

Browse files
committed
workflows: Order and comments for permissions
Signed-off-by: Loïc Minier <[email protected]>
1 parent 390b696 commit ab9dc55

File tree

9 files changed

+32
-29
lines changed

9 files changed

+32
-29
lines changed

.github/workflows/build-daily.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ on:
77
# allow manual runs
88
workflow_dispatch:
99

10+
# implicitely set all other permissions to none
1011
permissions:
11-
contents: read
12+
contents: read # debos.yml
1213

1314
jobs:
1415
build-daily:

.github/workflows/build-on-pr.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ name: Build on PR
33
on:
44
pull_request:
55

6+
# implicitely set all other permissions to none
67
permissions:
7-
checks: write # required by test reporting action
8-
pull-requests: write # required by test reporting action
9-
contents: read # github default
10-
packages: read # github default
8+
checks: write # test.yml
9+
contents: read # debos.yml lava-schema-check.yml test.yml
10+
packages: read # test.yml
11+
pull-requests: write # test.yml
1112

1213
jobs:
1314
event-file:

.github/workflows/build-on-push.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ on:
44
push:
55
branches: [main]
66

7+
# implicitely set all other permissions to none
78
permissions:
8-
checks: write
9-
pull-requests: write
10-
contents: read
11-
packages: read
9+
checks: write # test.yml
10+
contents: read # debos.yml lava-schema-check.yml test.yml
11+
packages: read # test.yml
12+
pull-requests: write # test.yml
1213

1314
jobs:
1415
build-daily:

.github/workflows/debos.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ on:
77
description: "URL to retrieve build artifacts"
88
value: ${{ jobs.build-debos.outputs.url }}
99

10-
# only need permission to read repository; implicitely set all other
11-
# permissions to none
10+
# implicitely set all other permissions to none
1211
permissions:
13-
contents: read
12+
contents: read # actions/checkout
1413

1514
# cancel in progress builds for this workflow triggered by the same ref
1615
concurrency:

.github/workflows/linux.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ on:
77
# allow manual runs
88
workflow_dispatch:
99

10-
# only need permission to read repository; implicitely set all other
11-
# permissions to none
10+
# implicitely set all other permissions to none
1211
permissions:
13-
contents: read
12+
contents: read # actions/checkout
1413

1514
env:
1615
# where results will be posted/hosted

.github/workflows/static-checks.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ on:
88
push:
99
branches: [main]
1010

11-
# only need permission to read repository; implicitely set all other
12-
# permissions to none
11+
# implicitely set all other permissions to none
1312
permissions:
14-
contents: read
13+
contents: read # actions/checkout
1514

1615
# cancel in progress builds for this workflow triggered by the same ref
1716
concurrency:

.github/workflows/test-pr.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ on:
88
types:
99
- completed
1010

11+
# implicitely set all other permissions to none
1112
permissions:
12-
checks: write # required by test reporting action
13-
pull-requests: write # required by test reporting action
14-
contents: read # github default
15-
packages: read # github default
13+
checks: write # test.yml EnricoMi/publish-unit-test-result-action
14+
contents: read # test.yml actions/checkout
15+
packages: read # test.yml actions/download-artifact
16+
# test.yml EnricoMi/publish-unit-test-result-action
17+
# thollander/actions-comment-pull-request
18+
pull-requests: write
1619

1720
jobs:
1821
retrieve-build-url:

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ on:
77
required: true
88
type: string
99

10+
# implicitely set all other permissions to none
1011
permissions:
11-
checks: write # EnricoMi/publish-unit-test-result-action
12-
pull-requests: write # EnricoMi/publish-unit-test-result-action
13-
contents: read # actions/checkout
14-
packages: read # actions/download-artifact
12+
checks: write # EnricoMi/publish-unit-test-result-action
13+
contents: read # actions/checkout
14+
packages: read # actions/download-artifact
15+
pull-requests: write # EnricoMi/publish-unit-test-result-action
1516

1617
jobs:
1718
prepare-job-list:

.github/workflows/u-boot.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ on:
77
# allow manual runs
88
workflow_dispatch:
99

10-
# only need permission to read repository; implicitely set all other
11-
# permissions to none
10+
# implicitely set all other permissions to none
1211
permissions:
13-
contents: read
12+
contents: read # actions/checkout
1413

1514
env:
1615
# where results will be posted/hosted

0 commit comments

Comments
 (0)