Skip to content

Expose go env variables as action outputs - #791

Merged
v-HarithaVattikuti merged 3 commits into
actions:mainfrom
v-mahabaleshwars:feature/54-go-env-outputs
Sep 18, 2026
Merged

v-HarithaVattikuti merged 3 commits into
actions:mainfrom
v-mahabaleshwars:feature/54-go-env-outputs

Conversation

@v-mahabaleshwars

Copy link
Copy Markdown
Contributor

Description:
Exposes the most commonly needed go env variables as action outputs, so workflows can reference them directly.

Related issue:
#54

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@v-mahabaleshwars
v-mahabaleshwars requested a review from a team as a code owner September 18, 2026 07:39
Copilot AI lite review requested due to automatic review settings September 18, 2026 07:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation, documentation, and tests are consistent and correctly expose the requested Go environment values as action outputs without introducing risky behavior changes.

Pull request overview

This PR enhances the actions/setup-go action by exposing a curated set of go env values as step outputs, allowing workflows to reference common Go paths and target information without running extra shell steps.

Changes:

  • Add go env -json parsing and export selected Go environment values as action outputs (including a computed go-bin-path fallback).
  • Define new output keys in src/constants.ts and document them in action.yml and docs/advanced-usage.md.
  • Add unit tests for the new parsing/output behavior and extend CI workflow to print the outputs across OSes.
File summaries
File Description
src/main.ts Reads go env -json and publishes selected values as action outputs.
src/constants.ts Adds new Outputs enum entries for Go environment outputs.
docs/advanced-usage.md Documents the new outputs, their meaning, and version requirements.
action.yml Declares the new outputs for consumers of the action.
.github/workflows/versions.yml Adds a workflow job to display the new outputs on Linux/macOS/Windows.
tests/setup-go.test.ts Adds tests for go env -json parsing and output setting behavior.
dist/setup/index.js Updates compiled distribution with new output constants and logic.
dist/cache-save/index.js Updates compiled distribution output constants (enum expansion).
Review details
  • Files reviewed: 6/8 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@v-mahabaleshwars v-mahabaleshwars self-assigned this Sep 18, 2026
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.

5 participants