2828
2929 workflow_dispatch :
3030
31+ permissions : read-all
32+
3133jobs :
3234 setup :
3335 strategy :
@@ -123,9 +125,16 @@ jobs:
123125
124126 test-native :
125127 if : ${{ !contains(github.ref_name, 'event/') && github.repository == 'meshtastic/firmware' }}
128+ permissions : # Needed for dorny/test-reporter.
129+ contents : read
130+ actions : read
131+ checks : write
126132 uses : ./.github/workflows/test_native.yml
127133
128134 docker :
135+ permissions : # Needed for pushing to GHCR.
136+ contents : read
137+ packages : write
129138 strategy :
130139 fail-fast : false
131140 matrix :
@@ -150,9 +159,6 @@ jobs:
150159 gather-artifacts :
151160 # trunk-ignore(checkov/CKV2_GHA_1)
152161 if : github.repository == 'meshtastic/firmware'
153- permissions :
154- contents : write
155- pull-requests : write
156162 strategy :
157163 fail-fast : false
158164 matrix :
@@ -225,13 +231,6 @@ jobs:
225231 path : ./*.elf
226232 retention-days : 30
227233
228- - uses : scruplelesswizard/comment-artifact@main
229- if : ${{ github.event_name == 'pull_request' }}
230- with :
231- name : firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
232- description : " Download firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
233- github-token : ${{ secrets.GITHUB_TOKEN }}
234-
235234 shame :
236235 if : github.repository == 'meshtastic/firmware'
237236 continue-on-error : true
@@ -275,6 +274,8 @@ jobs:
275274 # run: python3 bin/shame.py ${{ github.event.pull_request.number }} manifests-old/ manifests-new/
276275
277276 release-artifacts :
277+ permissions : # Needed for 'gh release upload'.
278+ contents : write
278279 runs-on : ubuntu-latest
279280 if : ${{ github.event_name == 'workflow_dispatch' && github.repository == 'meshtastic/firmware' }}
280281 outputs :
@@ -366,6 +367,8 @@ jobs:
366367 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
367368
368369 release-firmware :
370+ permissions : # Needed for 'gh release upload'.
371+ contents : write
369372 strategy :
370373 fail-fast : false
371374 matrix :
0 commit comments