Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

[Feat Request] Version from .tool-versions #244

Closed as not planned
Closed as not planned

Description

@SergioInToronto

Description

Any plans to support extracting version info from .tool-versions file? It would simplify a 2-step workflow into a single step.

Example

What I have currently:

jobs:
  release:
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Determine the buf version
        run: echo "BUF_VERSION=$(awk '/buf/{ print $2 }')" < .tool-versions >> $GITHUB_ENV

      - name: Setup buf
        uses: bufbuild/buf-setup-action@v1
        with:
          version: ${{ env.BUF_VERSION }}

I don't want to specify the version in two places (CI and .tool-versions for local development). It would be great if I could avoid this extra step in CI.

This is common in other GitHub Actions. Example:

jobs:
  release:
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Setup buf
        uses: bufbuild/buf-setup-action@v1
        with:
          version-file: .tool-versions

Activity

  1. emcfarlane commented on Mar 16, 2026

    @emcfarlane
    Contributor

    @SergioInToronto could you raise this as an issue on buf-action? Maybe this is just a configuration issue if you use the tool-version action: https://github.com/marketplace/actions/tool-versions

          - name: Read .tool-versions
            uses: marocchino/tool-versions-action@v2
            id: versions
          - uses: bufbuild/buf-action@v1
            with:
              version: ${{ steps.versions.outputs.buf }}
    
  2. nicksnyder commented on Jul 8, 2026

    @nicksnyder
    Member

    This action as been replaced by https://github.com/bufbuild/buf-action so we aren't making any more changes here.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions