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(action): asdf install and cache strategy #178

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Conversation

leiicamundi
Copy link
Contributor

@leiicamundi leiicamundi commented Jan 30, 2025

This PR introduces a new composite action that installs asdf, its plugins, and associated tools within a project while also managing its cache.

Cache invalidation occurs either when the tool-versions file changes or on a weekly expiration basis.

Another aspect concerns the maintenance of the previously used action. It heavily relies on JavaScript, whereas a few lines of Bash would suffice. For example, https://github.com/asdf-vm/actions/blob/master/install/main.js contains over 3,400 lines of code—far too complex for a simple tool installation. Moreover, the action has not been updated for two years.

Additionally, this composite action abstracts the cache logic, allowing us to control it from our central repository.

@leiicamundi leiicamundi changed the title update go asdf install and strict asdf cache feat(action): asdf install and cache strategy Jan 30, 2025
@leiicamundi leiicamundi requested a review from Langleu January 30, 2025 23:57
@leiicamundi leiicamundi self-assigned this Jan 30, 2025
@leiicamundi leiicamundi added the enhancement New feature or request label Jan 30, 2025
@leiicamundi leiicamundi enabled auto-merge (squash) January 30, 2025 23:57
id: cache-key
shell: bash
run: |
WEEK_NUMBER="$(date +%V)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to invalidate the cache on a weekly basis?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for understanding, the just file is completely decoupled from the asdf install tooling action, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants