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

GitHub Action

Tool Versions

v1.0.1

Tool Versions

play

Tool Versions

Output version numbers with .tool-versions file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Tool Versions

uses: marocchino/tool-versions-action@v1.0.1

Learn more about this action in marocchino/tool-versions-action

Choose a version

GitHub Actions status

Usage

Pre-requisites

Create a workflow .yml file in your repositories .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.

Inputs

  • path - path of .tool-versions file, .tool-versions by default

Outputs

Basically, It could be any values depending on your .tool-versions. You can find full asdf plugins list on here.

Example workflow

name: Get version info from tool-versions

on: push

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - name: Read .tool-versions
        uses: marocchino/tool-versions-action@v1
        id: versions
      - name: Use Node.js ${{ steps.versions.outputs.nodejs}}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ steps.versions.outputs.nodejs}}

License

The scripts and documentation in this project are released under the MIT License