sigs.k8s.io/kubebuilder/v3@v3.14.0/.github/workflows/lint.yml (about)

     1  name: Lint
     2  
     3  # Trigger the workflow on pull requests and direct pushes to any branch
     4  on:
     5    push:
     6    pull_request:
     7  
     8  jobs:
     9    lint:
    10      name: golangci-lint
    11      runs-on: ubuntu-latest
    12      # Pull requests from the same repository won't trigger this checks as they were already triggered by the push
    13      if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
    14      steps:
    15        - name: Setup Go
    16          uses: actions/setup-go@v5
    17          with:
    18            go-version: '~1.21'
    19        - name: Clone the code
    20          uses: actions/checkout@v4
    21        - name: Run linter
    22          uses: golangci/golangci-lint-action@v3
    23          with:
    24            version: v1.54
    25  
    26    yamllint:
    27      runs-on: ubuntu-latest
    28      steps:
    29        - uses: actions/checkout@v4
    30        - name: Run yamllint make target
    31          run: make yamllint