Merge pull request #4913 from turrisxyz/setup-permissions

Set permissions for GitHub actions
This commit is contained in:
Ming Deng 2022-05-16 22:15:22 +08:00 committed by GitHub
commit 7a2fd2eae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View File

@ -10,6 +10,9 @@ on:
branches:
- develop
permissions:
contents: read
jobs:
changelog:
runs-on: ubuntu-latest

View File

@ -11,8 +11,14 @@ on:
paths:
- "**/*.go"
- ".github/workflows/golangci-lint.yml"
permissions:
contents: read
jobs:
lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest
steps:
- name: Checkout codebase

View File

@ -4,9 +4,15 @@ on:
schedule:
- cron: "30 1 * * *"
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:

View File

@ -20,6 +20,9 @@ on:
- "go.sum"
- ".github/workflows/test.yml"
permissions:
contents: read
jobs:
test:
strategy: