name: golangci-lint
on:
  push:
    tags:
      - v*
    branches:
      - master
  pull_request:
permissions:
  contents: read
  # Optional: allow read access to pull request. Use with `only-new-issues` option.
  # pull-requests: read
jobs:
  golangci:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - name: Check out code into the Go module directory
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
          submodules: 'recursive'    

      - name: Set up Go 1.x
        uses: actions/setup-go@v4
        with:
          go-version: 'stable'
          cache: true

      - name: golangci-lint
        uses: golangci/golangci-lint-action@v3     
        with:
            args: --timeout=60m -E gofmt --verbose --print-resources-usage --build-tags full
        env:
          GOGC: "10"
