Skip to content

Commit

Permalink
Update golangci-lint.yml to have minimal permission
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Teles Sant'Anna <[email protected]>
  • Loading branch information
diogoteles08 authored Dec 18, 2023
1 parent 3f8bd73 commit 14b47e9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
# This action is synced from https:/prometheus/prometheus
name: golangci-lint
on:
Expand All @@ -12,8 +11,14 @@ on:
- ".golangci.yml"
pull_request:

permissions: # added using https:/step-security/secure-repo
contents: read

jobs:
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-latest
steps:
Expand All @@ -22,11 +27,11 @@ jobs:
- name: install Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Install snmp_exporter/generator dependencies
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
if: github.repository == 'prometheus/snmp_exporter'
- name: Lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.54.2
version: v1.55.2

0 comments on commit 14b47e9

Please sign in to comment.