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: check for pre-installed dagger #167

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

jpadams
Copy link
Contributor

@jpadams jpadams commented Dec 22, 2024

closes #164

Signed-off-by: Jeremy Adams <[email protected]>
Signed-off-by: Jeremy Adams <[email protected]>
Signed-off-by: Jeremy Adams <[email protected]>
Signed-off-by: Jeremy Adams <[email protected]>
@jpadams jpadams marked this pull request as draft December 22, 2024 21:33
@jpadams
Copy link
Contributor Author

jpadams commented Dec 22, 2024

Have to decide what to do if user wants to override version of pre-installed dagger. Do we install the desired dagger CLI version in the <install location prefix>/bin if set, or else just install in the default location? or intentionally clobber the existing version in its location (prob not), or install in either the default or designated spot and then make an adjustment to the PATH variable that will last for this actions invocation to give the new version precedence (and/or find a way to persist the PATH variable), or uninstall the previous version (prob not), or ...

@sagikazarmark
Copy link

I was just thinking about this and wanted to open an issue, when I saw your PR.

I think it makes sense to allow users using a pre-installed version, especially when moving to or between environments.

The new Depot integration comes to mind: reducing friction when onboarding or just building a PoC is always good. That was part of the appeal when I first gave Depot a try.

Have to decide what to do if user wants to override version of pre-installed dagger. Do we install the desired dagger CLI version in the /bin if set, or else just install in the default location? or intentionally clobber the existing version in its location (prob not), or install in either the default or designated spot and then make an adjustment to the PATH variable that will last for this actions invocation to give the new version precedence (and/or find a way to persist the PATH variable), or uninstall the previous version (prob not), or ...

A third option (which is what some actions do) is install Dagger in a custom location (eg. tool cache) and use it from there. The action can provide the location as an output if anyone wants to use it/add it to PATH, but in most of the cases, people will probably just want to use it through the action.

At some point, it might also make sense to create a separate setup-action for downloading the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants