https://github.com/ai/asdf-cache-action
A Github Action to install runtimes by asdf CLI with a cache
https://github.com/ai/asdf-cache-action
asdf github-actions
Last synced: 9 days ago
JSON representation
A Github Action to install runtimes by asdf CLI with a cache
- Host: GitHub
- URL: https://github.com/ai/asdf-cache-action
- Owner: ai
- Created: 2022-09-07T17:29:16.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-25T20:34:58.000Z (over 1 year ago)
- Last Synced: 2025-01-13T03:41:31.274Z (9 months ago)
- Topics: asdf, github-actions
- Homepage:
- Size: 13.7 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`.[`asdf-vm/actions/install`]: https://github.com/asdf-vm/actions
[`asdf`]: https://github.com/asdf-vm/asdf```yml
- name: Install tools from asdf config
uses: ai/asdf-cache-action@v1
```---
Made at Evil Martians, product consulting for developer tools.
---
## Full Example
```yml
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:```yml
- 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
```