on: [push, pull_request]
name: linter

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-go@v5
      with:
        go-version: 1.x
        cache-dependency-path: "**/go.sum"
    - run: script/lint.sh
      env:
        CHECK_GITHUB_OPENAPI: 1
        GITHUB_TOKEN: ${{ github.token }}
