workflows: reduce GITHUB_TOKEN permissions

This commit is contained in:
Bo Anderson 2021-09-15 15:10:11 +01:00
parent b19fcef629
commit f38a3239e6
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
8 changed files with 21 additions and 0 deletions

View File

@ -9,6 +9,8 @@ on:
release:
types:
- published
permissions:
contents: read
jobs:
ubuntu:
if: startsWith(github.repository, 'Homebrew/')

View File

@ -8,6 +8,8 @@ on:
- Library/Homebrew/extend/os/diagnostic.rb
- Library/Homebrew/extend/os/mac/diagnostic.rb
- Library/Homebrew/os/mac/xcode.rb
permissions:
contents: read
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1

View File

@ -10,6 +10,9 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
tapioca:
if: github.repository == 'Homebrew/brew'

View File

@ -7,6 +7,8 @@ on:
- master
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
spdx:
if: github.repository == 'Homebrew/brew'

View File

@ -6,6 +6,9 @@ on:
- master
pull_request:
permissions:
contents: read
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1

View File

@ -12,6 +12,8 @@ on:
schedule:
- cron: "0 */3 * * *" # every 3 hours
permissions:
concurrency: triage-${{ github.ref }}
jobs:

View File

@ -18,6 +18,9 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
update-manpage:
runs-on: ubuntu-latest

View File

@ -8,6 +8,10 @@ on:
description: Pull request number
required: true
permissions:
contents: read
pull-requests: read
jobs:
vendor-gems:
if: >