Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict permissions for GitHub actions #2334

Merged
merged 1 commit into from Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/linter.yml
@@ -1,8 +1,14 @@
on: [push, pull_request]
name: linter

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
strategy:
matrix:
go-version: [1.x]
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Expand Up @@ -10,8 +10,14 @@ name: tests
env:
GO111MODULE: on

permissions:
contents: read

jobs:
test:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: read # for actions/checkout to fetch code
strategy:
matrix:
go-version: [1.x, 1.17.x]
Expand Down