mint/tool-versions 1.0.2
Extract tool versions from a .tool-versions file.
Issue Tracker
Parameters
Parameter
Required
Default
Description
tool-versions-file
.tool-versions
Path to .tool-versions
README.md
Extract the versions specified in a .tool-versions file, used by tools such as
asdf and mise-en-place.
Versions are available as output values after calling this leaf.
Example
If your project has a .tool-versions file:
nodejs 22.4.1
ruby 3.3.2
Capture the versions to pass to other tasks:
tasks:
- key: code
call: mint/git-clone 1.5.1
with:
repository: https://github.com/YOUR_ORG/YOUR_REPO.git
ref: ${{ init.ref }
- key: tool-versions
use: code
call: mint/tool-versions 1.0.2
filter: [.tool-versions]
- key: nodejs
call: mint/install-node 1.1.0
with:
node-version: ${{ tasks.tool-versions.values.nodejs }}
- key: ruby
call: mint/install-ruby 1.1.5
with:
ruby-version: ${{ tasks.tool-versions.values.ruby }}
The output value is named based on the tool name, so we have nodejs and ruby in this example.
Remember to include the filter so that the task will be cached only based on the contents of the .tool-versions file.