Feature/kubebuilder style versioning #107
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2025 Copyright © 2025 OpenCHAMI a Series of LF Projects, LLC | |
| # SPDX-FileCopyrightText: Copyright © 2025 OpenCHAMI a Series of LF Projects, LLC | |
| # | |
| # SPDX-License-Identifier: MIT | |
| name: Lint | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| golangci-lint: | |
| name: golangci-lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| cache: false | |
| # Temporarily rename examples directory to exclude it from linting | |
| # The examples contain placeholder imports that don't exist | |
| - name: Temporarily hide examples directory | |
| run: | | |
| if [ -d examples ]; then | |
| mv examples .examples.tmp | |
| fi | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| # Use latest version of golangci-lint | |
| version: latest | |
| # Only show new issues for PRs | |
| only-new-issues: true | |
| # Working directory if not root | |
| # working-directory: . | |
| # Optional: show only new issues if it's a pull request | |
| args: --timeout=5m | |
| # Restore examples directory | |
| - name: Restore examples directory | |
| if: always() | |
| run: | | |
| if [ -d .examples.tmp ]; then | |
| mv .examples.tmp examples | |
| fi |