feat(node-go): thêm golangci-lint + Renovate auto-bump #3

Merged
thuanle merged 1 commits from feat/node-go-golangci-lint into main 2026-08-11 15:22:29 +07:00
Owner

Summary

Thêm golangci-lint vào image node-go và thiết lập cơ chế tự update version lâu dài qua Renovate (thay vì pin cứng rồi nâng tay).

Changes

  • node-go/Dockerfile

    • Thêm ARG GOLANGCI_LINT_VERSION=v2.12.2
    • Cài qua official install.sh (tự nhận amd64/arm64), đặt vào /usr/local/bin
  • renovate.json (trước đó chỉ có $schema)

    • customManagers regex bump GOLANGCI_LINT_VERSION (github-releases) và GO_VERSION (golang-version)
    • packageRules automerge an toàn:
      • golangci-lint: auto-merge minor/patch; major (vd v2→v3) mở PR review
      • Go: chỉ auto-merge patch; minor (vd 1.26→1.27) mở PR review
  • node-go/README.md (mới)

    • Liệt kê đầy đủ phần mềm đã cài (Node, Go 1.26, golangci-lint v2.12.2, git, gcc/libc6-dev cho cgo...)
    • Phần "Những gì KHÔNG có" chỉ rõ cần cài thêm gì (Docker CLI → docker-node, Python → node-python, Make/jq/zip, các go install tool dự án như mockgen/protoc-gen-go...)
  • README.md (root): thêm golangci-lint vào danh sách + đổi note sang cơ chế Renovate

Why pin + Renovate thay vì latest

Đây là image CI build hàng tuần, cần update mới liên tục. Pin bằng ARG giữ build reproducible + rollback được, còn Renovate lo việc bump tự động qua PR (có git trail). Major bump vẫn cần review thủ công để tránh breaking (golangci-lint v1→v2 từng break config).

Test plan

  • Workflow .gitea/workflows/node-go.yml chạy xanh cho cả 2 arch (push branch này đã trigger build vì path node-go/** khớp)
  • Trong image: golangci-lint version in ra v2.12.2
  • Sau khi merge, đợi vòng Renovate tiếp theo kiểm tra PR bump thực sự được tạo

Lưu ý

Workflow hiện tại trigger trên push: paths: node-go/** (mọi branch), nên push branch này đã build + đẩy image :latest. Nếu muốn image chỉ update từ main, cân nhắc thêm branches: [main] vào workflow (ngoài scope PR này).

## Summary Thêm `golangci-lint` vào image **node-go** và thiết lập cơ chế tự update version lâu dài qua Renovate (thay vì pin cứng rồi nâng tay). ## Changes - **`node-go/Dockerfile`** - Thêm `ARG GOLANGCI_LINT_VERSION=v2.12.2` - Cài qua official `install.sh` (tự nhận amd64/arm64), đặt vào `/usr/local/bin` - **`renovate.json`** (trước đó chỉ có `$schema`) - `customManagers` regex bump `GOLANGCI_LINT_VERSION` (`github-releases`) và `GO_VERSION` (`golang-version`) - `packageRules` automerge an toàn: - **golangci-lint**: auto-merge minor/patch; major (vd v2→v3) mở PR review - **Go**: chỉ auto-merge patch; minor (vd 1.26→1.27) mở PR review - **`node-go/README.md`** (mới) - Liệt kê đầy đủ phần mềm đã cài (Node, Go 1.26, golangci-lint v2.12.2, git, gcc/libc6-dev cho cgo...) - Phần **"Những gì KHÔNG có"** chỉ rõ cần cài thêm gì (Docker CLI → `docker-node`, Python → `node-python`, Make/jq/zip, các `go install` tool dự án như mockgen/protoc-gen-go...) - **`README.md`** (root): thêm golangci-lint vào danh sách + đổi note sang cơ chế Renovate ## Why pin + Renovate thay vì `latest` Đây là image CI build hàng tuần, cần update mới liên tục. Pin bằng `ARG` giữ build reproducible + rollback được, còn Renovate lo việc bump tự động qua PR (có git trail). Major bump vẫn cần review thủ công để tránh breaking (golangci-lint v1→v2 từng break config). ## Test plan - [ ] Workflow `.gitea/workflows/node-go.yml` chạy xanh cho cả 2 arch (push branch này đã trigger build vì path `node-go/**` khớp) - [ ] Trong image: `golangci-lint version` in ra `v2.12.2` - [ ] Sau khi merge, đợi vòng Renovate tiếp theo kiểm tra PR bump thực sự được tạo ## Lưu ý Workflow hiện tại trigger trên `push: paths: node-go/**` (mọi branch), nên push branch này đã build + đẩy image `:latest`. Nếu muốn image chỉ update từ `main`, cân nhắc thêm `branches: [main]` vào workflow (ngoài scope PR này).
claudecode added 1 commit 2026-08-11 15:20:47 +07:00
feat(node-go): add golangci-lint + Renovate auto-bump
node-go image / build (amd64) (push) Failing after 1s
node-go image / build (arm64) (push) Failing after 53s
node-go image / amend-manifest (push) Skipped
155991fcbc
- Add golangci-lint v2.12.2 to node-go image (arch-aware via official install.sh)
- Wire renovate.json to auto-bump GOLANGCI_LINT_VERSION (minor/patch automerge)
  and GO_VERSION (patch automerge); keep pins for reproducible/rollback-able builds
- Add node-go/README.md documenting installed tools and what's NOT included
- Update root README accordingly

Co-Authored-By: Claude <noreply@anthropic.com>
thuanle merged commit 5d37cee6af into main 2026-08-11 15:22:29 +07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: public/base#3