Polish the comment in cluster CRD #464
This file contains 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: Lint golang | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'src/go/**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
paths: | |
- 'src/go/**' | |
env: | |
GOPRIVATE: github.com/redpanda-data/* | |
jobs: | |
go: | |
name: Lint go files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Install gofumpt | |
env: | |
GOFUMPT_VER: 0.5.0 | |
run: | | |
mkdir -v -p "$HOME/.local/bin" | |
wget -O "$HOME/.local/bin/gofumpt" "https://github.com/mvdan/gofumpt/releases/download/v${GOFUMPT_VER}/gofumpt_v${GOFUMPT_VER}_linux_amd64" | |
chmod 0700 "$HOME/.local/bin/gofumpt" | |
- name: Run gofumpt | |
run: | | |
find src/go -type f -not -name 'zz*' -name '*.go' | xargs -n1 "$HOME/.local/bin/gofumpt" -w -lang=1.21 | |
git diff --exit-code | |
- name: configure git | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }} | |
run: git config --global "url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf" https://github.com/ | |
- name: go mod tidy (k8s) | |
working-directory: src/go/k8s | |
run: | | |
GOPRIVATE=github.com/redpanda-data/* go mod tidy | |
git diff --exit-code -- go.mod go.sum | |