fix(deps): update kubernetes monorepo to v0.37.0 #138
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
| name: Golang CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [labeled, unlabeled, opened, synchronize, reopened] | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - '**/*.go' | |
| - '.github/workflows/golang.yaml' | |
| - 'flake.nix' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - 'Makefile' | |
| - 'common.mk' | |
| - 'tools.lock' | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| outputs: | |
| go-version: ${{ steps.go-version.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - id: go-version | |
| uses: opendefensecloud/dev-kit/.github/actions/get-go-version@f16fb83a8669ba840346929d9c45b9efe95c4da0 # v1.0.15 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7 | |
| with: | |
| go-version: ${{ steps.go-version.outputs.version }} | |
| - name: lint-license-and-shell | |
| run: | | |
| # shellcheck is pre-installed on ubuntu-24.04, this is mostly for local execution | |
| if ! command -v shellcheck &> /dev/null; then | |
| echo "shellcheck is missing. Installing..." | |
| sudo apt-get update && sudo apt-get install -y shellcheck | |
| fi | |
| make lint-no-golangci | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9 | |
| test: | |
| needs: lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7 | |
| with: | |
| go-version: ${{ needs.lint.outputs.go-version }} | |
| - name: test | |
| run: | | |
| make test |