Browse Source

[main] Grant GitHub actions explicit permissions (#38420)

Doug Bunting 4 years ago
parent
commit
f23e72ee7b
2 changed files with 10 additions and 0 deletions
  1. 5 0
      .github/workflows/backport.yml
  2. 5 0
      .github/workflows/runtime-sync.yml

+ 5 - 0
.github/workflows/backport.yml

@@ -3,6 +3,11 @@ on:
   issue_comment:
   issue_comment:
     types: [created]
     types: [created]
 
 
+permissions:
+  contents: write
+  issues: write
+  pull-requests: write
+
 jobs:
 jobs:
   backport:
   backport:
     if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/backport to')
     if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/backport to')

+ 5 - 0
.github/workflows/runtime-sync.yml

@@ -8,6 +8,11 @@ on:
     # Once per day at midnight PST (8 UTC)
     # Once per day at midnight PST (8 UTC)
     - cron: '0 8 * * *'
     - cron: '0 8 * * *'
 
 
+permissions:
+  contents: write
+  issues: write
+  pull-requests: write
+
 jobs:
 jobs:
   compare_repos:
   compare_repos:
     # Comment out this line to test the scripts in a fork
     # Comment out this line to test the scripts in a fork