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

Isolate Ruby installation from system ruby version #5

Closed
jcbhmr opened this issue Jan 26, 2024 · 2 comments
Closed

Isolate Ruby installation from system ruby version #5

jcbhmr opened this issue Jan 26, 2024 · 2 comments

Comments

@jcbhmr
Copy link
Collaborator

jcbhmr commented Jan 26, 2024

Ideally the fontist installation is self contained such that this:

- uses: ruby/setup-ruby@v1
  with:
    ruby-version: "ruby-3.0.0"
- uses: fontist/setup@v1
- run: ruby --version

would return the "ruby-3.0.0" version INSTEAD OF the version that "fontist/setup" installed globallyfor itself to use. That means somehow shoving Ruby and the fontist cli ruby files somewhere out of the main system path.

note that Ruby needs to know the dest path ahead of time (its somehow hardcoded in the binaries/config)

thoeretically this could be done with something like this:

curl -fsSL https://github.com/ruby/setup-ruby/releases/... idk some URL to download the .zip release archive
unzip setup-ruby-v1.2.3
export RUNNER_TOOL_CACHE=/my/custom/path
export GITHUB_PATH=/github-path.txt
export GITHUB_ENV=/github-env.txt
node setup-ruby-v1.2.3/dist/index.js

/my/custom/path/gem install fontist

# then somehow cache the /my/custom/path or whatever

maybe?

@jcbhmr
Copy link
Collaborator Author

jcbhmr commented Jan 26, 2024

i think this could also make it easier to do #1 ?

@jcbhmr
Copy link
Collaborator Author

jcbhmr commented Jan 27, 2024

I think @CAMOBAP is right that we can just rely on the system Ruby installation as "good enough" and just hope that nobody does ruby-version: ruby-2 on https://github.com/ruby/setup-ruby lol

#1 (comment)

@jcbhmr jcbhmr closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant