Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 1, 2025

The GitHub Actions build pipeline was failing due to a critical step ordering issue and several outdated configurations.

Problem

The build was failing with the error:

go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.

This occurred because the linter installation step was running before the code checkout step, so go get was trying to install packages without access to the project's go.mod file.

Solution

Fixed multiple issues in the build pipeline:

  1. Reordered workflow steps: Moved code checkout before linter installation so go.mod is available
  2. Modernized package management:
    • Replaced deprecated go get -u github.com/mgechev/revive with go install github.com/mgechev/revive@latest
    • Replaced deprecated go get -v -t -d ./... with go mod tidy
  3. Updated action versions: Upgraded from v2 to v4 for both setup-go and checkout actions
  4. Fixed Go version compatibility: Updated from ^1.17 to ^1.23 to match the go.mod requirements
  5. Ensured binary accessibility: Used full path $(go env GOPATH)/bin/revive for reliable linter execution

Testing

All build steps now pass successfully:

  • ✅ Dependencies download correctly
  • ✅ Linting completes without errors
  • go vet passes
  • ✅ All tests pass
  • ✅ Package builds successfully

The build pipeline is now modernized and ready for reliable CI/CD operations.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits September 1, 2025 00:44
Co-authored-by: ziflex <1607148+ziflex@users.noreply.github.com>
Co-authored-by: ziflex <1607148+ziflex@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the build pipeline Fix GitHub Actions build pipeline failures Sep 1, 2025
Copilot AI requested a review from ziflex September 1, 2025 00:47
@ziflex ziflex marked this pull request as ready for review September 1, 2025 00:48
@ziflex ziflex merged commit 6e9e047 into master Sep 1, 2025
2 checks passed
@ziflex ziflex deleted the copilot/fix-f8e384fa-e6c2-4629-aa7b-5ffd45b1d9a9 branch September 1, 2025 00:50
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.

2 participants