From 2591df3b118bd781b3fc8751a4519e16230a88ae Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 2 Apr 2024 07:35:32 +0100 Subject: [PATCH] Set write permission on specific job (#6915) * set wirte permission on specific job * only allow read --- .github/workflows/backport.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 9a3b7bdb14..9afc5b840f 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -10,12 +10,14 @@ on: types: [ "labeled", "closed" ] permissions: - contents: write + contents: read jobs: backport: name: Backport PR runs-on: ubuntu-latest + permissions: + contents: write if: | github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'backport')