Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(asdf-tools): install asdf from release assets #102

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/asdf-tools.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- __noop

jobs:
tests-pre-commit:
asdf-tools-test:
runs-on: ubuntu-22.04
steps:
- uses: hmarr/debug-action@v2
Expand Down
19 changes: 15 additions & 4 deletions asdf-tools/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Install asdf tools

inputs:
version:
description: The version of asdf
default: v0.16.2
required: false
plugins:
description: List of additional plugins (e.g., <plugin>=<url>)
description: List of additional plugins (e.g., <plugin>=<url>, comma-separated)
required: false
context:
description: Directory of the file .tool-versions located
Expand All @@ -13,15 +17,22 @@ runs:
using: composite
steps:
- name: Install asdf
# See https://github.com/asdf-vm/actions/commit/main/
uses: asdf-vm/actions/setup@1bf052e01b498bba4f98e1bbb5c609bc212cf463
run: |
set -e
curl -fsSL -o asdf.tar.gz "https://github.com/asdf-vm/asdf/releases/download/${{ inputs.version }}/asdf-${{ inputs.version }}-linux-amd64.tar.gz"
tar -xzf asdf.tar.gz
mv asdf /usr/local/bin/
rm -f asdf.tar.gz
which asdf
echo "asdf installed successfully"
shell: bash

- name: Cache tools
# See https://github.com/actions/cache/commits/main/
uses: actions/cache@36f1e144e1c8edb0a652766b484448563d8baf46
with:
path: /home/runner/.asdf
key: ${{ runner.os }}-^0.16.0-${{ hashFiles('**/.tool-versions') }}
key: ${{ runner.os }}-${{ inputs.version }}-${{ hashFiles('**/.tool-versions') }}

- name: Install asdf tools
run: |
Expand Down