on: [push, pull_request]
name: linter

permissions:
  contents: read

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