Skip to content

Simplify CI workflows: remove legacy GOPATH checkout pattern#4597

Open
aravindtga wants to merge 1 commit into
kptdev:mainfrom
Nordix:simplify-workflow-gopath-removal
Open

Simplify CI workflows: remove legacy GOPATH checkout pattern#4597
aravindtga wants to merge 1 commit into
kptdev:mainfrom
Nordix:simplify-workflow-gopath-removal

Conversation

@aravindtga

Copy link
Copy Markdown
Contributor

Description

  • What changed:

    • Removed the legacy GOPATH-style checkout layout (path: go/src/github.com/kptdev/kpt), the top-level GOPATH env variable, and all associated working-directory directives from 6 workflow files.
    • Simplified actions/setup-go@v6 configuration by dropping explicit cache: true and cache-dependency-path where defaults suffice.
    • Retained cache-dependency-path: api/go.sum in release-api.yml for the submodule.
    • Fixed deprecated ::set-output in release.yml with $GITHUB_OUTPUT.
    • Removed workdir from goreleaser/goreleaser-action@v6 in release.yml.
  • Why it's needed: The project uses Go modules, the GOPATH checkout layout is unnecessary legacy from the pre-modules era. It adds verbosity and fragility to every workflow. The ::set-output deprecation will eventually break release builds.

  • How it works: With Go modules, go commands work from any directory containing go.mod. Checking out to the default workspace root eliminates the need for custom paths and working-directory overrides.

Type of Change

  • Refactor

Checklist

  • Code follows project style guidelines
  • Self-reviewed changes
  • Tests added/updated
  • Documentation added/updated
  • All tests and gating checks pass

AI Disclosure

  • I have used AI in the creation of this PR.

If so, please describe how:
- Kiro to identify the unnecessary GOPATH pattern across all workflow files and to generate PR message.

Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
@aravindtga aravindtga self-assigned this Jun 18, 2026
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 2a77471
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6a33e9228b68390008dd1dfe
😎 Deploy Preview https://deploy-preview-4597--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the GitHub Actions CI/release workflows to remove the legacy GOPATH-style checkout layout and associated working-directory overrides, relying on standard Go modules behavior from the repository root.

Changes:

  • Removed GOPATH-style checkout paths and working-directory directives across multiple workflows so jobs run from the default workspace root.
  • Simplified actions/setup-go@v6 configuration by using go-version-file paths relative to the repo root and dropping explicit cache settings where not needed.
  • Updated the release workflow to replace deprecated ::set-output usage with $GITHUB_OUTPUT and removed the GoReleaser action workdir.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/verifyContent.yml Drops GOPATH checkout path and runs build/verify steps from repo root with go-version-file: go.mod.
.github/workflows/release.yml Removes GOPATH checkout/workdir usage and replaces deprecated step output with $GITHUB_OUTPUT.
.github/workflows/release-api.yml Switches API release workflow to repo-root checkout while still targeting the api/ module via go-version-file.
.github/workflows/live-e2e.yml Removes GOPATH checkout and working-directory, running e2e from repo root.
.github/workflows/go.yml Removes top-level GOPATH env and GOPATH-based checkout paths for Linux/macOS jobs.
.github/workflows/e2eEnvironment.yml Removes GOPATH checkout and working-directory, running e2e from repo root.

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

@aravindtga aravindtga marked this pull request as ready for review June 18, 2026 12:55
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. area/devops labels Jun 18, 2026
@aravindtga aravindtga requested review from a team June 18, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/devops size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants