-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Enable post-ruby-install
hook
#239
base: master
Are you sure you want to change the base?
Conversation
Yes, this is very tempting but there are many problems with this approach.
Any reason you crossed that? It doesn't work maybe?
IMHO not having the Gemfile/gemspec in the repo is a big hurdle for contributors and gem standards. If you generate those, then generate them whenever something changes, and have a check in CI they are up to date (by generating them and checking there is no diff). |
I was hoping to document this in the README, if the proposal was merge-worthy. The idea was to instruct users to write a shell script to run multiple commands and execute the shell script via the provided hook.. steps:
- uses: ruby/setup-ruby@v1
with:
post-ruby-install: bash .github/workflows/scripts/my_script
The hook was implemented to run only if Bundler was going to be consequently installed.
I agree with you. This was actually for a repository that was started in the Ruby 1.8 era (and still under maintenance), that I contribute to. The repo had used TravisCI in the past relying on the CI's @eregon Thank you for taking a look at my proposal. |
I forgot to mention in my first reply. A general solution for this would be to extract a separate action to do the bundler caching.
That's a good idea, just accept a single command and tell users to use a shell script for anything more complex.
Oh right, I hate this behavior, the command is asking to update RubyGems, not Bundler, Bundler shouldn't get installed (especially in a weird place where it cannot be uninstalled). I'll think a bit more about this. |
I did consider this option though but given that even
Thank you very much :) |
Motivation
Currently, if one is using this action to set up Ruby and manage caching of their gemset, there is no way to *micro-manage * the environment before Bundler gets installed and consequently executing
bundle install
.With this hook, the end-user will be able to:
change the Rubygems version if needed, orrake
gem manually and invoke Rake task(s) that sets up the project's Gemfile / Gemspec for consequent consumption by Bundler.P.S. I did not generate the
dist/index.js
because I'm on Windows and the generation process is altering the line-endings.