Set write permission on specific job (#6915)

* set wirte permission on specific job

* only allow read
This commit is contained in:
Matthias Mair 2024-04-02 07:35:32 +01:00 committed by GitHub
parent 4db61df8cd
commit 2591df3b11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,12 +10,14 @@ on:
types: [ "labeled", "closed" ] types: [ "labeled", "closed" ]
permissions: permissions:
contents: write contents: read
jobs: jobs:
backport: backport:
name: Backport PR name: Backport PR
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: write
if: | if: |
github.event.pull_request.merged == true github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'backport') && contains(github.event.pull_request.labels.*.name, 'backport')