...

Text file src/github.com/prometheus/common/.github/workflows/golangci-lint.yml

Documentation: github.com/prometheus/common/.github/workflows

     1---
     2# This action is synced from https://github.com/prometheus/prometheus
     3name: golangci-lint
     4on:
     5  push:
     6    paths:
     7      - "go.sum"
     8      - "go.mod"
     9      - "**.go"
    10      - "scripts/errcheck_excludes.txt"
    11      - ".github/workflows/golangci-lint.yml"
    12      - ".golangci.yml"
    13  pull_request:
    14
    15permissions:  # added using https://github.com/step-security/secure-repo
    16  contents: read
    17
    18jobs:
    19  golangci:
    20    permissions:
    21      contents: read  # for actions/checkout to fetch code
    22      pull-requests: read  # for golangci/golangci-lint-action to fetch pull requests
    23    name: lint
    24    runs-on: ubuntu-latest
    25    steps:
    26      - name: Checkout repository
    27        uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
    28      - name: install Go
    29        uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
    30        with:
    31          go-version: 1.22.x
    32      - name: Install snmp_exporter/generator dependencies
    33        run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
    34        if: github.repository == 'prometheus/snmp_exporter'
    35      - name: Lint
    36        uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
    37        with:
    38          version: v1.56.2

View as plain text