Skip to content

ci(go): add GitHub Actions build workflow; drop local pre-commit hooks#47

Merged
hyp3rd merged 2 commits intomainfrom
feat/secrets
Jan 12, 2026
Merged

ci(go): add GitHub Actions build workflow; drop local pre-commit hooks#47
hyp3rd merged 2 commits intomainfrom
feat/secrets

Conversation

@hyp3rd
Copy link
Owner

@hyp3rd hyp3rd commented Jan 12, 2026

  • Add .github/workflows/go.yml to build on PRs and pushes to main.
  • Load project settings from .project-settings.env (GO_VERSION, GCI_PREFIX default github.com/hyp3rd/starter, GOLANGCI_LINT_VERSION, PROTO_ENABLED).
  • Set up Go via actions/setup-go@v6.1.0; cache modules; run go mod download, go mod tidy (with diff check), go mod verify, and go build -v ./....
  • Remove local go-verify and gci hooks from .pre-commit-ci-config.yaml to simplify local tooling.

Why: enforce module hygiene and builds in CI while reducing reliance on local hooks.

…nd JSON/req fixers

- remove hooks: check-json, pretty-format-json (excluded cspell.json), requirements-txt-fixer
- drop gitleaks and hadolint hooks
- keep core whitespace fixers and strict yamllint; cspell CLI remains
- Add .github/workflows/go.yml to build on PRs and pushes to main.
- Load project settings from .project-settings.env (GO_VERSION, GCI_PREFIX default github.com/hyp3rd/starter, GOLANGCI_LINT_VERSION, PROTO_ENABLED).
- Set up Go via actions/setup-go@v6.1.0; cache modules; run `go mod download`, `go mod tidy` (with diff check), `go mod verify`, and `go build -v ./...`.
- Remove local `go-verify` and `gci` hooks from `.pre-commit-ci-config.yaml` to simplify local tooling.

Why: enforce module hygiene and builds in CI while reducing reliance on local hooks.
Copilot AI review requested due to automatic review settings January 12, 2026 15:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new GitHub Actions workflow for Go builds and module verification while removing several pre-commit hooks to consolidate CI checks in GitHub Actions.

Changes:

  • Adds .github/workflows/go.yml to run Go module verification and build on PRs and main branch pushes
  • Removes multiple pre-commit hooks from .pre-commit-ci-config.yaml including local Go hooks (go-verify, gci) and several other hooks

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/go.yml New workflow that loads project settings, sets up Go, caches modules, runs go mod download/tidy/verify, and builds the project
.pre-commit-ci-config.yaml Removes local go-verify and gci hooks, plus json, gitleaks, hadolint, and requirements hooks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

echo "proto_enabled=${PROTO_ENABLED:-true}" >> "$GITHUB_OUTPUT"

- name: Set up Go
uses: actions/setup-go@v6.1.0
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version specifier 'v6.1.0' for actions/setup-go is inconsistent with other workflows in the repository, which all use 'v6' without a patch version. For consistency and maintainability, this should use the same version format as the other workflows (codeql.yml, lint.yml, pre-commit.yml, proto.yml, security.yml, and test.yml all use 'actions/setup-go@v6').

Suggested change
uses: actions/setup-go@v6.1.0
uses: actions/setup-go@v6

Copilot uses AI. Check for mistakes.
source .project-settings.env
set +a
echo "go_version=${GO_VERSION}" >> "$GITHUB_OUTPUT"
echo "gci_prefix=${GCI_PREFIX:-github.com/hyp3rd/starter}" >> "$GITHUB_OUTPUT"
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for GCI_PREFIX is 'github.com/hyp3rd/starter' but the actual value in .project-settings.env is 'github.com/hyp3rd/sectools'. This default appears to be incorrect and should match the actual project. The same inconsistency exists in lint.yml. Consider updating the default to match the actual project value.

Suggested change
echo "gci_prefix=${GCI_PREFIX:-github.com/hyp3rd/starter}" >> "$GITHUB_OUTPUT"
echo "gci_prefix=${GCI_PREFIX:-github.com/hyp3rd/sectools}" >> "$GITHUB_OUTPUT"

Copilot uses AI. Check for mistakes.
@hyp3rd hyp3rd merged commit 2300f86 into main Jan 12, 2026
21 checks passed
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