Skip to content

Commit 1117842

Browse files
authored
feat!: support asdf >= v0.16.0 (#590)
1 parent 1bf052e commit 1117842

File tree

15 files changed

+68438
-814
lines changed

15 files changed

+68438
-814
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,11 @@ jobs:
3535
- name: "Setup: should clone repo"
3636
uses: ./setup
3737
- run: asdf version
38-
- name:
39-
"Simulate self-hosted runner and remove /home/runner/.asdf/bin/asdf
40-
after setup (:shrug:)"
38+
- name: "Simulate self-hosted runner and remove /home/runner/.asdf/bin/asdf after setup"
4139
if: ${{ matrix.os == 'ubuntu-latest' }}
4240
run: |
4341
rm -rf /home/runner/.asdf/bin/asdf
44-
- name:
45-
"Simulate self-hosted runner and remove /Users/runner/.asdf/bin/asdf
46-
after setup (:shrug:)"
42+
- name: "Simulate self-hosted runner and remove /Users/runner/.asdf/bin/asdf after setup"
4743
if: ${{ matrix.os == 'macos-latest' }}
4844
run: |
4945
rm -rf /Users/runner/.asdf/bin/asdf
@@ -64,9 +60,9 @@ jobs:
6460
- uses: actions/checkout@v4
6561
- uses: ./plugin-test
6662
with:
67-
command: direnv --version
68-
plugin: direnv
69-
giturl: https://github.com/asdf-community/asdf-direnv.git
63+
command: node --version
64+
plugin: nodejs
65+
giturl: https://github.com/asdf-vm/asdf-nodejs.git
7066
gitref: master
7167

7268
plugins_are_installed:
@@ -98,19 +94,19 @@ jobs:
9894
- uses: ./setup
9995
- name: Add an asdf plugin
10096
run: |
101-
asdf plugin-add clusterctl https://github.com/pfnet-research/asdf-clusterctl.git
97+
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
10298
- uses: ./plugins-add
10399
with:
104100
tool_versions: |
105101
# tools won't be installed by this action, only plugins
106102
elixir foo
107103
nodejs bar
108104
# plugins already installed are here
109-
clusterctl tako
105+
erlang baz
110106
- run: |
111107
asdf plugin list --urls --refs | grep elixir
112108
asdf plugin list --urls --refs | grep nodejs
113-
asdf plugin list --urls --refs | grep clusterctl
109+
asdf plugin list --urls --refs | grep erlang
114110
115111
tools_are_installed:
116112
strategy:
@@ -124,5 +120,5 @@ jobs:
124120
uses: ./install
125121
with:
126122
before_install: echo asdf nodejs import-keyring
127-
tool_versions: direnv 2.32.1
128-
- run: direnv version
123+
tool_versions: nodejs 22.14.0
124+
- run: node --version

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ workflows.
1111

1212
| Action | Use | Description |
1313
| :------------ | :------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
14-
| `install` | `asdf-vm/actions/install@v3` | Installs `asdf` & tools in `.tool-versions`.<br>Plugins fetched from [asdf-vm/asdf-plugins](https://github.com/asdf-vm/asdf-plugins) |
15-
| `setup` | `asdf-vm/actions/setup@v3` | Only install `asdf` CLI. |
16-
| `plugins-add` | `asdf-vm/actions/plugins-add@v3` | Only install plugins, not tools. |
17-
| `plugin-test` | `asdf-vm/actions/plugin-test@v3` | Plugin author test automation. |
14+
| `install` | `asdf-vm/actions/install@v4` | Installs `asdf` & tools in `.tool-versions`.<br>Plugins fetched from [asdf-vm/asdf-plugins](https://github.com/asdf-vm/asdf-plugins) |
15+
| `setup` | `asdf-vm/actions/setup@v4` | Only install `asdf` CLI. |
16+
| `plugins-add` | `asdf-vm/actions/plugins-add@v4` | Only install plugins, not tools. |
17+
| `plugin-test` | `asdf-vm/actions/plugin-test@v4` | Plugin author test automation. |
1818

1919
<!-- TOC -->
2020
* [Usage](#usage)
@@ -34,7 +34,7 @@ workflows.
3434
```yaml
3535
steps:
3636
- name: Install asdf & tools
37-
uses: asdf-vm/actions/install@v3
37+
uses: asdf-vm/actions/install@v4
3838
```
3939
4040
To avoid breaking changes, use the full [Semantic Version](https://semver.org/)
@@ -45,9 +45,9 @@ steps:
4545
# Reference a specific commit (most strict, for the supply-chain paranoid)
4646
- uses: asdf-vm/actions/install@f4acd427436df623426c29f7e3e9ea715be28396
4747
# Reference a semver major version only (GitHub recommended)
48-
- uses: asdf-vm/actions/install@v3
48+
- uses: asdf-vm/actions/install@v4
4949
# Reference a semver version of a release (recommended)
50-
- uses: asdf-vm/actions/install@v3.0.2
50+
- uses: asdf-vm/actions/install@v4.0.2
5151
# Reference a branch (most dangerous)
5252
- uses: asdf-vm/actions/install@master
5353
```
@@ -76,7 +76,7 @@ Installs `asdf` & tools in `.tool-versions`. Plugins fetched from
7676

7777
```yaml
7878
steps:
79-
- uses: asdf-vm/actions/install@v3
79+
- uses: asdf-vm/actions/install@v4
8080
```
8181

8282
<!-- TODO(jthegedus): capture action.yml options in a markdown table here. Show usage examples for each option. -->
@@ -89,7 +89,7 @@ Plugin author test automation
8989

9090
```yaml
9191
steps:
92-
- uses: asdf-vm/actions/plugin-test@v3
92+
- uses: asdf-vm/actions/plugin-test@v4
9393
with:
9494
command: my_tool --version
9595
```
@@ -107,7 +107,7 @@ Only install `asdf` CLI.
107107

108108
```yaml
109109
steps:
110-
- uses: asdf-vm/actions/setup@v3
110+
- uses: asdf-vm/actions/setup@v4
111111
```
112112

113113
<!-- TODO(jthegedus): capture action.yml options in a markdown table here. Show usage examples for each option. -->
@@ -123,7 +123,7 @@ Only install plugins, not tools.
123123

124124
```yaml
125125
steps:
126-
- uses: asdf-vm/actions/plugins-add@v3
126+
- uses: asdf-vm/actions/plugins-add@v4
127127
```
128128

129129
<!-- TODO(jthegedus): capture action.yml options in a markdown table here. Show usage examples for each option. -->
@@ -135,7 +135,7 @@ See [action.yml](plugins-add/action.yml) inputs.
135135
### Full Example Workflow
136136

137137
This example workflow demonstrates how to use the Install Action:
138-
`asdf-vm/actions/install@v3`. It is taken from the
138+
`asdf-vm/actions/install@v4`. It is taken from the
139139
[asdf-vm/asdf-plugin-template](https://github.com/asdf-vm/asdf-plugin-template)
140140
repository.
141141

@@ -159,15 +159,15 @@ jobs:
159159
shellcheck:
160160
runs-on: ubuntu-latest
161161
steps:
162-
- uses: actions/checkout@v3
163-
- uses: asdf-vm/actions/install@v3
162+
- uses: actions/checkout@v4
163+
- uses: asdf-vm/actions/install@v4
164164
- run: scripts/lint.bash
165165
# script runs Shellcheck, Shfmt etc installed by previous action
166166
167167
actionlint:
168168
runs-on: ubuntu-latest
169169
steps:
170-
- uses: actions/checkout@v3
170+
- uses: actions/checkout@v4
171171
- name: Check workflow files
172172
uses: docker://rhysd/actionlint:1.6.23
173173
with:
@@ -197,7 +197,7 @@ jobs:
197197
image: ${{ matrix.container }}
198198
199199
steps:
200-
- uses: asdf-vm/actions/plugin-test@v3
200+
- uses: asdf-vm/actions/plugin-test@v4
201201
with:
202202
command: my_tool --version
203203
```

install/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ inputs:
1717
asdf_branch:
1818
description: asdf branch to clone
1919
required: false
20-
default: master
20+
asdf_version:
21+
description: asdf version to install
22+
required: false
23+
default: latest
2124
skip_install:
2225
description: setup env without installing asdf
2326
required: false
2427
default: false
28+
github_token:
29+
description: Token used to avoid rate limit when asdf calls the GitHub API
30+
required: false
31+
default: ${{ github.token }}

0 commit comments

Comments
 (0)