name: Lint

on:
  pull_request: {}

env:
  GOPRIVATE: github.com/weaveworks/aws-sdk-go-private

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    container: weaveworks/eksctl-build:563d25d20c1c4ee95ebd8c8e4a155e463fec1559
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Cache go-build and mod
        uses: actions/cache@v2
        with:
          path: |
            ~/.cache/go-build/
            ~/go/pkg/mod/
          key: go-${{ hashFiles('go.sum') }}
          restore-keys: |
            go-
      - name: Lint
        run: make lint
