Skip to content

Commit 5ea435d

Browse files
committed
Declare workflow permissions
1 parent 216fe6a commit 5ea435d

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ on:
4141
# keep in mind this will have ALL tests enabled
4242
workflow_dispatch:
4343

44+
# read by default, jobs may request more
45+
permissions:
46+
contents: read
47+
actions: read
48+
4449
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
4550
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
4651
concurrency:
@@ -134,6 +139,10 @@ jobs:
134139
name: Build Clusters on JDK ${{ matrix.java }}
135140
if: contains(github.event.pull_request.labels.*.name, 'ci:no-build') == false
136141
runs-on: ubuntu-latest
142+
# cache and artifact upload
143+
permissions:
144+
contents: write
145+
actions: write
137146
timeout-minutes: 40
138147
strategy:
139148
matrix:
@@ -2639,6 +2648,8 @@ jobs:
26392648
# * the workflow got cancelled
26402649
if: ${{ always() && needs.base-build.result == 'success' && (!contains(needs.*.result, 'failure') || cancelled()) }}
26412650
runs-on: ubuntu-latest
2651+
permissions:
2652+
actions: write
26422653
timeout-minutes: 60
26432654
steps:
26442655

0 commit comments

Comments
 (0)