ericcornelissen/tool-versions-update-action

Support non-standard `asdf` plugins

Closed this issue · 0 comments

Summary

As of v0.1.1, uses asdf-vm/actions/install to install asdf and plugins. However, per the docs:

Installs asdf & tools in .tool-versions. Plugins fetched from asdf-vm/asdf-plugins

it does install "non-standard"1 plugins - hence this action doesn't work with non-standard plugins. This includes the fact that users can't choose to use a different plugin from the "standard" one for a given tool.

To install other plugins when using asdf-vm/actions you have to do something like:

- name: Configure plugins
  run: |
    asdf plugin add actionlint https://github.com/crazy-matt/asdf-actionlint.git
    asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
    asdf plugin add shfmt https://github.com/luizm/asdf-shfmt
    asdf plugin add yamllint https://github.com/ericcornelissen/asdf-yamllint

Suggestion

Add an option to list the plugin name+URLs pairs that should be installed. If omitted, this action's behavior is unchanged. If provided, this action should loop over the pairs (newline separated, in all likelihood) and asdf plugin add {name} {URL} each one before looking for updates.

Workaround

It should be possible to work around this limitation of the action using a job like:

Note: This has not been confirmed, if you tried this workaround please share if it worked or not 🙂

steps:
- name: Install asdf & tools
  uses: asdf-vm/actions/install@v2
- name: Configure plugins
  run: |
    asdf plugin add actionlint https://github.com/crazy-matt/asdf-actionlint.git
    asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
    asdf plugin add shfmt https://github.com/luizm/asdf-shfmt
    asdf plugin add yamllint https://github.com/ericcornelissen/asdf-yamllint
- uses: ericcornelissen/tool-versions-update-action@v0.1.1
  with:
    max: 2

Footnotes

  1. i.e. plugins not listed in https://github.com/asdf-vm/asdf-plugins#plugin-list