name: Lint

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  GO_VERSION: 1.18

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/setup-go@v3
        with:
          go-version: 1.18

      - name: Checkout code
        uses: actions/checkout@v3

      - name: Golangci lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.48.0