Skip to content

Pin Go via setup-go go-version-file in the reusable claude/infer workflows #154

Closed

Description

The reusable @claude / @infer workflows (.github/workflows/claude.yml, .github/workflows/infer.yml in this repo) run Go tasks on whatever Go the GitHub runner ships - currently go1.27.0 on ubuntu-24.04. Consumer repos pin a different version in go.mod.

Symptom: in inference-gateway/adk (go 1.26.4), the bot ran task format under gofmt 1.27 and committed the result. The repo's own CI (ci.yml) uses actions/setup-go@v7 with go-version-file: 'go.mod' -> gofmt 1.26 -> it reformatted the file back and git diff --exit-code failed. The two gofmt versions disagree on continuation indentation for a multi-value return with composite literals (client/artifact_helper_test.go). Details: inference-gateway/adk#284

This will recur on any Go repo whose go.mod version differs from the runner default.

Fix: when language: go, add a Go setup step before the agent runs:

- uses: actions/[email protected]
  with:
    go-version-file: 'go.mod'
    cache: true

The calling repos cannot do this themselves - a job that uses a reusable workflow via uses: cannot add steps.

Originating repo/PR: inference-gateway/adk#284
Actions run: https://github.com/inference-gateway/adk/actions/runs/32978349540

Activity

  1. added a commit that references this issue on Aug 26, 2026
    f915688
  2. inference-gateway-releaser commented on Sep 20, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.26.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions