Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.57 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.57 KB

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@v3
      - name: Read .tool-versions
        uses: marocchino/tool-versions-action@v1
        id: versions
      - name: Use Node.js ${{ steps.versions.outputs.nodejs }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ steps.versions.outputs.nodejs }}
      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v3
        with:
          hugo-version: ${{ fromJSON(steps.versions.outputs.hugo).version }}
          extended: ${{ fromJSON(steps.versions.outputs.hugo).is_extended }}

License

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