Skip to content

Commit

Permalink
chore: grant golangci-lint-action the permission to create annotations (
Browse files Browse the repository at this point in the history
#40)

Signed-off-by: Joonas Bergius <joonas@cosmonic.com>
  • Loading branch information
joonas authored Nov 7, 2024
1 parent 1c7c71d commit 886822e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ env:

jobs:
lint:
# Context: https://github.com/golangci/golangci-lint-action/blob/v6.1.1/README.md#annotations
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -50,6 +56,12 @@ jobs:
run: go test -v ./...

examples:
# Context: https://github.com/golangci/golangci-lint-action/blob/v6.1.1/README.md#annotations
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
strategy:
matrix:
example:
Expand Down Expand Up @@ -91,4 +103,5 @@ jobs:
- name: wash build
working-directory: "_examples/${{ matrix.example }}"
run: wash build
run: |
wash build

0 comments on commit 886822e

Please sign in to comment.