Skip to content

A Github Action to install runtimes by asdf CLI with a cache

Notifications You must be signed in to change notification settings

ai/asdf-cache-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

asdf cache action

A GitHub Action that install asdf and all runtimes from .tool-versions.

It is a wrapper for asdf-vm/actions/install with a caches for asdf and optionally for pnpm.

      - name: Install tools from asdf config
        uses: ai/asdf-cache-action@v1

Made at Evil Martians, product consulting for developer tools.


Full Example

name: CI
on:
  push:
    branches:
      - main
  pull_request:
permissions:
  contents: read
jobs:

  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the repository
        uses: actions/checkout@v4
      - name: Install tools from asdf config
        uses: ai/asdf-cache-action@v1
      - name: Install dependencies
        run: pnpm install --ignore-scripts
      - name: Run tests
        run: pnpm test

Inputs

If you are have jobs with pnpm install and pnpm install --prod you can use dependencies-cache input to set different cache for a security reasons:

      - name: Install tools from asdf config
        uses: ai/asdf-cache-action@v1
        with:
          dependencies-cache: production
      - name: Install dependencies
        run: pnpm install --prod --ignore-scripts

About

A Github Action to install runtimes by asdf CLI with a cache

Topics

Resources

Stars

Watchers

Forks