asdf GitHub Actions
This repo provides a collection of asdf related actions for use in your workflows.
Usage
How to specify the version
There is a point that is particularly easy to misunderstand. It's where you specify the version of the action itself.
- name: Test plugin
uses: asdf-vm/actions/plugin-test@v1
# ^^^
with:
command: my_tool --version
env:
GITHUB_API_TOKEN: ${{ github.token }}We recommend that you include the version of the action. We adhere to
semantic versioning, it's safe to use the major version
(v1) in your workflow. If you use the master branch, this could break your
workflow when we publish a breaking update and increase the major version.
steps:
# Reference the major version of a release (most recommended)
- uses: asdf-vm/actions/plugin-test@v1
# Reference a specific commit (most strict)
- uses: asdf-vm/actions/plugin-test@a368498
# Reference a semver version of a release (not recommended)
- uses: asdf-vm/actions/plugin-test@v1.0.1
# Reference a branch (most dangerous)
- uses: asdf-vm/actions/plugin-testmasterExample workflow
name: Main workflow
on:
pull_request:
paths-ignore:
- "**.md"
push:
paths-ignore:
- "**.md"
schedule:
- cron: 0 0 * * 5
jobs:
plugin_test:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Test plugin
uses: asdf-vm/actions/plugin-test@v1
with:
command: my_tool --version
env:
GITHUB_API_TOKEN: ${{ github.token }}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run ShellCheck
run: shellcheck bin/*
format:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install shfmt
run: brew install shfmt
- name: Run shfmt
run: shfmt -d .Trick to avoid problems
Using the images provided by the Actions team may be difficult to test correctly due to current asdf implementation constraints. In this case, you can use Docker containers and avoid them.
jobs:
plugin_test:
strategy:
fail-fast: false
matrix:
container:
- alpine:latest
- centos:latest
- ubuntu:latest
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- name: Test plugin
uses: asdf-vm/actions/plugin-test@v1
with:
command: my_tool --version
env:
GITHUB_API_TOKEN: ${{ github.token }}Actions
Main actions
These two actions are probaly the most useful:
asdf-vm/actions/install- Install your.tool-versionsplugins and tools.
steps:
- name: asdf_install
uses: asdf-vm/actions/install@v1See action.yml inputs.
asdf-vm/actions/plugin-test- Test your shiny new asdf plugin.
steps:
- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v1
with:
command: my_tool --version
env:
GITHUB_API_TOKEN: ${{ github.token }}See action.yml inputs.
Lower level actions
These actions are used internally by the above ones. And you won't need to use them directly, unless you actually want.
-
asdf-vm/actions/plugins-add- Only install plugins, not tool versions.See action.yml inputs.
-
asdf-vm/actions/setup- Just installs asdf itself.See action.yml inputs.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
