name: Checks

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
    types:
      - opened
      - synchronize
      - reopened

jobs:
  lint:
    name: Lint
    if: ${{ github.repository == 'dot013/.www-new' }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup go
        uses: actions/setup-go@v5
        with:
          go-version: '1.22.2'
      - name: Generate templ
        run: |
          go install github.com/a-h/templ/cmd/templ@latest
          make templ
      - name: Check
        uses: golangci/golangci-lint-action@v6
        with:
          version: v1.58
