Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Go

on:
pull_request:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Load project settings
id: settings
run: |
set -a
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.
echo "golangci_lint_version=${GOLANGCI_LINT_VERSION}" >> "$GITHUB_OUTPUT"
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.
with:
go-version: "${{ steps.settings.outputs.go_version }}"
check-latest: true

- name: Cache Go modules
uses: actions/cache@v5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ steps.settings.outputs.go_version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ steps.settings.outputs.go_version }}-

- name: Modules download
run: go mod download

- name: Tidy check
run: |
go mod tidy
git diff --exit-code go.mod go.sum

- name: Verify
run: go mod verify

- name: Build
run: go build -v ./...
24 changes: 0 additions & 24 deletions .pre-commit-ci-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-json
- id: pretty-format-json
exclude: cspell.json
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
Expand All @@ -16,22 +13,13 @@ repos:
files: .*\.(yaml|yml)$
exclude: mkdocs.yml
args: [--allow-multiple-documents]
- id: requirements-txt-fixer
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.37.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict -f parsable
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint-docker
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v9.4.0
hooks:
Expand All @@ -57,15 +45,3 @@ repos:
entry: mdl
language: ruby
files: \.(md|mdown|markdown)$
- repo: local
hooks:
- id: go-verify
name: go-verify
language: system
entry: ./.pre-commit/go-mod-hook
require_serial: true
- id: gci
name: gci
language: system
entry: ./.pre-commit/gci-hook
require_serial: true
Loading