Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Parse .tool-versions

Actions
Parse .tool-versions file, setting versions in env variables
v2.0.0
Star (4)

parse-tool-versions

Github action that parses .tool-versions into the environment.

Usage

      - name: Parse .tool-versions
        uses: wistia/[email protected]
        with:
          uppercase: 'true'
          postfix: '_tool_versions'
          filename: '.tool-versions'
          
      # Sometime later in the same job...

      - uses: mskelton/setup-yarn@v1
        with:
          node-version: ${{ env.NODEJS_TOOL_VERSION }}

All inputs are optional, inputs shown are defaults. by default this command appends _tool_version to the name of each entry in the .tool-versions file, uppercases it, and adds it to GITHUB_ENV

Inputs

Uppercase

set this to any string besides 'true' to use snake_case instead of MACRO_CASE

Postfix

use to control what is appended to the tool name. _tool_version was chosen in the unlikely event you already have a {tool}_VERSION flag set; you could set postfix to _version if you wish.

Filename

The filename read from. This can be a path

Parse .tool-versions is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Parse .tool-versions file, setting versions in env variables
v2.0.0

Parse .tool-versions is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.