Skip to content

feat: add configurable golangci-lint-version input#39

Draft
G36maid wants to merge 2 commits intomainfrom
fix/golang-ci-latest
Draft

feat: add configurable golangci-lint-version input#39
G36maid wants to merge 2 commits intomainfrom
fix/golang-ci-latest

Conversation

@G36maid
Copy link
Copy Markdown
Contributor

@G36maid G36maid commented Feb 14, 2026

目的

讓 Go 品質檢查工作流程支援可配置的 golangci-lint 版本,並修正安裝模式為 goinstall,解決先前使用 version: latest 導致 CI 不穩定的問題 ( 無法檢查 golang > 1.24 以上版本 )。

方法/實作說明

go-checks composite action 和 reusables-go workflow 中新增 golangci-lint-version 輸入參數,並將 golangci-lint-action 的安裝模式設定為 goinstall

  • 主要修改:
    • .github/actions/go-checks/action.yml:新增 golangci-lint-version 輸入參數(預設 latest),並將 install-mode 設為 goinstall
    • .github/workflows/reusables-go.yml:新增 golangci-lint-version 輸入參數並傳遞給 go-checks action
  • 關鍵實作:
    • 透過輸入參數讓使用者可根據專案需求指定 golangci-lint 版本

關聯 Issue

附註

  • TODO:
    • 更新 README.md 中的使用範例,加入 golangci-lint-version 參數說明

Add golangci-lint-version as input parameter to both go-checks action
and reusables-go workflow. Use go install mode as requested.

Update reusables-go.yml
Update README.md and reusables-go.yml to reflect that golangci-lint-version
defaults to 'latest' instead of a specific version number.
@G36maid G36maid force-pushed the fix/golang-ci-latest branch from 17dfca2 to 36b4ef2 Compare February 14, 2026 14:45
@github-actions
Copy link
Copy Markdown

🛡️ PR Quality Check Summary

PR Title: Passed (Length: 50/75, Format: OK). feat: add configurable golangci-lint-version input
Branch Name: Follows naming convention (fix/golang-ci-latest)
Commit Messages: All 2 commit(s) passed (Length, Format, Case)
Conflicts: No merge conflict markers found
YAML Files: All 12 file(s) passed validation
JSON Files: All 1 file(s) are valid
TOML Files: No TOML files found to check


🎉 All checks passed!

@G36maid G36maid marked this pull request as draft February 14, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant