github.com/seilagamo/poc-lava-release@v0.3.3-rc3/.github/workflows/golangci-lint.yaml (about)

     1  # Copyright 2023 Adevinta
     2  
     3  name: Golangci-lint
     4  on: [push, pull_request]
     5  permissions:
     6    contents: read
     7  jobs:
     8    golangci-lint:
     9      name: Lint
    10      runs-on: ubuntu-latest
    11      env:
    12        GOLANGCI_LINT_VERSION: v1.54.2
    13        GOLANGCI_LINT_OUT_FORMAT: ${{ github.event_name == 'pull_request' && 'github-actions' || 'colored-line-number' }}
    14      steps:
    15        - name: Checkout repository
    16          uses: actions/checkout@v4
    17        - name: Set up Go
    18          uses: actions/setup-go@v4
    19          with:
    20            go-version: '1.21'
    21        - name: Remove Go problem matchers
    22          run: echo "::remove-matcher owner=go::"
    23        - name: Install "golangci-lint"
    24          run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{ env.GOLANGCI_LINT_VERSION }}
    25        - name: Run "golangci-lint run"
    26          run: golangci-lint run --out-format=${{ env.GOLANGCI_LINT_OUT_FORMAT }} ./...