Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.69 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.69 KB

Tool Versions Action V1

CI CodeQL Coverage dist/ Linter

This action reads versions from an asdf compatible .tool-versions file and sets the versions as outputs in your workflow.

Variables are available in the following format: ${{ steps.tool-versions-action.outputs.nodejs-version }}

Where tool-versions-action is defined as the action's step ID.

Usage

To include the action in a workflow in another repository, you can use the uses syntax with the @ symbol to reference a specific branch, tag, or commit hash.

steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Parse Tool Versions
    id: tool-versions-action
    uses: AGS4NO/tool-versions-action@v1
    with:
      file: .tool-versions

  - name: Print Tool Versions Output
    id: output
    run: |
      echo "NodeJS Version:" \
      echo "${{ steps.tool-versions-action.outputs.nodejs-version }}"

  - name: Setup Node.js
    id: setup-node
    uses: actions/setup-node@v4
    with:
      node-version: ${{ steps.tool-versions-action.outputs.nodejs-version }}
      cache: npm