Skip to content

feat(ci): setup Go version from go.mod if possible#465

Merged
xnyo merged 8 commits intomainfrom
giuseppe/caching-split-1
Jan 7, 2026
Merged

feat(ci): setup Go version from go.mod if possible#465
xnyo merged 8 commits intomainfrom
giuseppe/caching-split-1

Conversation

@xnyo
Copy link
Copy Markdown
Member

@xnyo xnyo commented Dec 18, 2025

Part of #405. Part of #441.

Original PR: #460, split for easier reviewing.

  • Changes the logic for determining the Go version by using go.mod if possible
  • Refactors the logic for determing Go and Node version to use a dedicated js step for easier reading

@xnyo xnyo self-assigned this Dec 18, 2025
@xnyo xnyo added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Dec 18, 2025
@xnyo xnyo changed the title perf(ci): Go caching improvements feat(ci): setup Go version from go.mod if possible Dec 18, 2025
@xnyo xnyo removed the github_actions Pull requests that update GitHub Actions code label Dec 18, 2025
@xnyo xnyo moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Dec 18, 2025

- name: Install pnpm
if: steps.package-manager.outputs.name == 'pnpm'
if: ${{ steps.package-manager.outputs.name == 'pnpm' }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No change in behavior, just for consistency with the other actions in the repo

Copy link
Copy Markdown
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 refactors the Go and Node.js version determination logic in the CI workflow to support reading versions from configuration files (go.mod and .nvmrc) when explicit versions are not provided.

Key changes:

  • Adds support for go-version-file input to read Go version from go.mod
  • Introduces a dedicated JavaScript step to centralize version determination logic
  • Makes go-version and node-version inputs optional with fallback to version files or defaults

Reviewed changes

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

File Description
actions/internal/plugins/setup/action.yml Updates input parameters to support both explicit versions and version files for Go and Node.js, making them optional instead of required
.github/workflows/ci.yml Adds a new "Determine Go and Node versions" step using github-script action to centralize version resolution logic with fallback hierarchy (explicit → file → default)

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

Comment thread actions/internal/plugins/setup/action.yml
Comment thread actions/internal/plugins/setup/action.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
xnyo and others added 4 commits December 18, 2025 18:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@xnyo xnyo marked this pull request as ready for review December 18, 2025 17:20
@xnyo xnyo requested review from a team as code owners December 18, 2025 17:20
@xnyo xnyo merged commit 5d5ab0a into main Jan 7, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Jan 7, 2026
@xnyo xnyo deleted the giuseppe/caching-split-1 branch January 7, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants