Shard Detail

action-parse-asdf-tool-versions v0.1.0

Parse asdf managed .tool-versions with asdf-vm built-in function
asdf github-actions asdf-plugin

Install & Use

Add the following code to your project's shard.yml under:

dependencies to use in production
- OR -
development_dependencies to use in development


action-parse-asdf-tool-versions:
  github: kachick/action-parse-asdf-tool-versions

Readme

action-parse-asdf-tool-versions

CI

Parse asdf managed .tool-versions with asdf-vm built-in function.
So will work even if the .tool-versions using comments and multiple versions.

Usage

Only need id field for this action

jobs:
  asdf-parser:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: actions/checkout@v3
      - uses: kachick/action-parse-asdf-tool-versions@v1
        id: parse
    outputs:
      tool-versions: "${{ steps.parse.outputs.json }}"
  test:
    needs: [asdf-parser]
    timeout-minutes: 15
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: "${{ fromJson(needs.asdf-parser.outputs.tool-versions).nodejs }}"
      - run: npm ci
      - run: npm test

Major setup-* actions provide input option as *-version. Use this action and pass to them keep consistency of repository's .tool-versions and CI.
Actual working examples are below.