Open isaac-tribal opened 1 year ago
Hi @isaac-tribal, thanks for reporting. Are you getting this error on every run or on some specific branch?
Hi @isaac-tribal thanks for reporting this!
Nitro's action is using the ruby/setup-ruby
action to ensure ruby is installed but it assumes your RN project includes a .ruby-version
file which is not good as previous RN versions does not include this file by default or you may don't want to have this file in your project.
As a temporary workaround you can include a .ruby-version
file specifying a version inside of it.
Upon further consideration, I believe that it should not be Nitro's responsibility to take care of this. Rather, it should be something that the end user should define, including a new step if necessary. Something like:
name: nitro-build-ios
on: workflow_dispatch
jobs:
build:
runs-on: macos-12
env:
NITRO_API_KEY: ${{ secrets.NITRO_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.6' # or whatever version
- uses: nitro-build/github-action-nitro-ios@v1
I'd like to hear your thoughts regarding this.
Error: Error: input ruby-version needs to be specified if no .ruby-version or .tool-versions file exists at parseRubyEngineAndVersion (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68858:13) at setupRuby (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68795:35) at run (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68773:11) at /Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68938:40 at /Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68940:3 at Object.<anonymous> (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68943:12) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1[15](https://github.com/TribalTech/ey-mobile/actions/runs/4244002769/jobs/7377509208#step:8:17)9:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:8[22](https://github.com/TribalTech/ey-mobile/actions/runs/4244002769/jobs/7377509208#step:8:24):12)