-
Notifications
You must be signed in to change notification settings - Fork 69
Support .ruby-version #31
Comments
I was wondering if there is a workaround available, like - name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: "{{ cat('.ruby-version') }}" However I was not able to figure out how to do that yet :( |
I found a workaround in actions/setup-node repo.
|
happy to see the workaround ☝️ - leaving as an enhancement for consideration |
@bryanmacfarlane To be honest, and without any anger or nothing, I want to point out that supporting Thus I think we should consider supporting the I think it's fine and great that people are creating actions on the marketplace but for some very popular actions, the ones from GitHub should really cover most use cases otherwise we'll endup with a marketplace like the npm registry where you spend half a day trying to find the "right" ruby action that works well.. Thanks for consideration! PS: Maybe @eregon, creator of use-ruby-action you have some thoughts about this too? Thanks! |
I implemented it in I think longer term we'll want most (all maybe) features of use-ruby-action in this repo: #44 |
There a GitHub issue open for the setup-ruby action in which they are considering making this happen automatically, but somebody gave this way of implementing it for now: actions/setup-ruby#31 (comment)
There a GitHub issue open for the setup-ruby action in which they are considering making this happen automatically, but somebody gave this way of implementing it for now: actions/setup-ruby#31 (comment)
There a GitHub issue open for the setup-ruby action in which they are considering making this happen automatically, but somebody gave this way of implementing it for now: actions/setup-ruby#31 (comment)
* Try installing a few deps * Install Node, Ruby, and attach a Postgres instance * Match the installed version of ruby with the one in ruby-version * Use a clever method for finding the current ruby version actions/setup-ruby#31 (comment) * Oops, gotta checkout the code before reading the version * Bump to the latest patch version of Ruby * Bump the Gemfile too * Health check the Postgres instance and split out the bundle step * use the latest Postgres, reformat the heallth check * Point Rails at the service container * Switch back to port mapping postgres to the local machine * Manually set up the postgres instance and use DATABASE_URL for telling Rails where to look * Deploy using GitHub workflows * Use secrets store * Setup both api. and git. for Heroku * Specify the Heroku app to deploy to * Double check current config * debug heroku auth * Work that netrc * try and preserve newlines when writing netrc * Be extra specific with the GH branch we want to push * Only deploy on master * I read the docs * Install specific node versions * Cache Node Modules runs * Cache Ruby dependencies * Ditch Travis
* Try installing a few deps * Install Node, Ruby, and attach a Postgres instance * Match the installed version of ruby with the one in ruby-version * Use a clever method for finding the current ruby version actions/setup-ruby#31 (comment) * Oops, gotta checkout the code before reading the version * Bump to the latest patch version of Ruby * Bump the Gemfile too * Health check the Postgres instance and split out the bundle step * use the latest Postgres, reformat the heallth check * Point Rails at the service container * Switch back to port mapping postgres to the local machine * Manually set up the postgres instance and use DATABASE_URL for telling Rails where to look * Deploy using GitHub workflows * Use secrets store * Setup both api. and git. for Heroku * Specify the Heroku app to deploy to * Double check current config * debug heroku auth * Work that netrc * try and preserve newlines when writing netrc * Be extra specific with the GH branch we want to push * Only deploy on master * I read the docs * Install specific node versions * Cache Node Modules runs * Cache Ruby dependencies * Ditch Travis Switch the build badge from Travis to GH Actions ayy wow
* Try installing a few deps * Install Node, Ruby, and attach a Postgres instance * Match the installed version of ruby with the one in ruby-version * Use a clever method for finding the current ruby version actions/setup-ruby#31 (comment) * Oops, gotta checkout the code before reading the version * Bump to the latest patch version of Ruby * Bump the Gemfile too * Health check the Postgres instance and split out the bundle step * use the latest Postgres, reformat the heallth check * Point Rails at the service container * Switch back to port mapping postgres to the local machine * Manually set up the postgres instance and use DATABASE_URL for telling Rails where to look * Deploy using GitHub workflows * Use secrets store * Setup both api. and git. for Heroku * Specify the Heroku app to deploy to * Double check current config * debug heroku auth * Work that netrc * try and preserve newlines when writing netrc * Be extra specific with the GH branch we want to push * Only deploy on master * I read the docs * Install specific node versions * Cache Node Modules runs * Cache Ruby dependencies * Ditch Travis Switch the build badge from Travis to GH Actions ayy wow Clobber the remote ref Fix a Gemfile Ruby version issue Fetch the whole repository because Heroku wants it Keep the Heroku app names secret and Deploy to Production
* Try installing a few deps * Install Node, Ruby, and attach a Postgres instance * Match the installed version of ruby with the one in ruby-version * Use a clever method for finding the current ruby version actions/setup-ruby#31 (comment) * Oops, gotta checkout the code before reading the version * Bump to the latest patch version of Ruby * Bump the Gemfile too * Health check the Postgres instance and split out the bundle step * use the latest Postgres, reformat the heallth check * Point Rails at the service container * Switch back to port mapping postgres to the local machine * Manually set up the postgres instance and use DATABASE_URL for telling Rails where to look * Deploy using GitHub workflows * Use secrets store * Setup both api. and git. for Heroku * Specify the Heroku app to deploy to * Double check current config * debug heroku auth * Work that netrc * try and preserve newlines when writing netrc * Be extra specific with the GH branch we want to push * Only deploy on master * I read the docs * Install specific node versions * Cache Node Modules runs * Cache Ruby dependencies * Ditch Travis Switch the build badge from Travis to GH Actions ayy wow Clobber the remote ref Fix a Gemfile Ruby version issue Fetch the whole repository because Heroku wants it Keep the Heroku app names secret and Deploy to Production
This is GitHub’s default template, plus an extra step to respect `.ruby-version`, which is taken from actions/setup-ruby#31 (comment).
This is GitHub’s default template, plus an extra step to respect `.ruby-version`, which is taken from actions/setup-ruby#31 (comment).
This is GitHub’s default template, plus an extra step to respect `.ruby-version`, which is taken from actions/setup-ruby#31 (comment).
The step to respect `.ruby-version` is taken from actions/setup-ruby#31 (comment).
The step to respect `.ruby-version` is taken from actions/setup-ruby#31 (comment).
I saw the same concept works for
It would be nice if that supported the same way here. |
Given that someone may be AFK... eregon/use-ruby-action@master has moved to ruby/setup-ruby. For info specific to .ruby_version, see supported-version-syntax. ruby/setup-ruby supports almost all Ruby versions since 2.2, fully tested head/master builds, and all platforms are supported. Understandably, GitHub prefers not to host EOL software, but others can, as does ruby/setup-ruby. I'm not recommending using it. Also, most actions that are past development stage are not using master. Or, master may be dangerous, as new features may be developed there. So, use
instead of
|
That got me confused as I was trying to install my ruby version which I can't give as an argument for setup-ruby, and the only way mentioned as in the example:
Until I landed in an example that does so as my last comment, I wonder why that not specified in the docs here, if that is the official one! |
Forgive me, I'm confused.
here is actions/setup-ruby, which is the action supported by GitHub. My post was mostly referring to ruby/setup-ruby (which is where eregon/use-ruby-action moved to) which is within the Ruby organization, and is not supported by GitHub. If, using ruby/setup-ruby, you want to read Ruby version info from the .ruby-version file, use:
You can also not include the |
Thanks, @MSP-Greg for clarification, both have the same name really confused me, between Ruby and Actions, and BTW when I used:
without |
@mo-rubikal Glad you found how to use it. |
Many ruby projects include a
.ruby-version
file in the root directory, containing the version of Ruby needed.Tools such as
rvm
,rbenv
andchruby
all recognise and use this file.This is not unlike the
.nvmrc
file often used in Node projects, and thesetup-node
action has a discussion on potentially using the contents of that file as the node version if nowith:
argument is specified. (actions/setup-node#32)I would suggest that
setup-ruby
might consider a similar approach, where if no explicit ruby version is given, look for a.ruby-version
file and use the version contained within.The text was updated successfully, but these errors were encountered: