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

danger is not working with [email protected] #1472

Open
okatatuki opened this issue Dec 18, 2023 · 0 comments · May be fixed by #1473
Open

danger is not working with [email protected] #1472

okatatuki opened this issue Dec 18, 2023 · 0 comments · May be fixed by #1473

Comments

@okatatuki
Copy link

okatatuki commented Dec 18, 2023

Report

danger is not working with [email protected]

What did you do?

I run danger at github actions "danger/danger@master"

What did you expect to happen?

successful termination

my Dangerfile only follow correcting branch name

What happened instead?

error happend

  #11 [7/8] RUN gem install bundler
  #11 22.54 ERROR:  Error installing bundler:
  #11 22.54 	The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
  #11 22.54 	bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.8.225.
  #11 ERROR: process "/bin/sh -c gem install bundler" did not complete successfully: exit code: 1
  ------
   > [7/8] RUN gem install bundler:
  22.54 ERROR:  Error installing bundler:
  22.54 	The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22`
  22.54 	bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.8.225.
  ------
  Dockerfile:21
  --------------------
    19 |     COPY . /myapp
    20 |     
    21 | >>> RUN gem install bundler
    22 |     
    23 |     ENV BUNDLE_GEMFILE=/myapp/Gemfile
  --------------------
  ERROR: failed to solve: process "/bin/sh -c gem install bundler" did not complete successfully: exit code: 1
Error: Docker build failed with exit code 1

I suggensting ruby version discrepancies

danger run [email protected]

FROM ruby:2.7

danger use bundler@latest

gem "bundler"

but bundler require ruby version 3.0.0
https://rubygems.org/gems/bundler/versions/2.5.1

Your Environment

  • github actions
name: check pull request

on: pull_request

jobs:
  danger:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: danger/danger@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  • What is your Dangerfile?
base_branch = github.branch_for_base
head_branch = github.branch_for_head

if base_branch.match(/release\/.+/) && !head_branch.match(/feature\/.+/)
    fail('release/** ブランチに merge するのは feature/** ブランチにしてください')
end

if base_branch == 'main' && !(head_branch.match(/release\/.+/) || head_branch.match(/hotfix\/.+/) || head_branch.match(/feature\/.+/))
    fail('main ブランチに merge するのは release/**  または hotfix/** または feature/** ブランチにしてください')
end
okatatuki added a commit to okatatuki/danger that referenced this issue Dec 19, 2023
`docker build` fails with the message "bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.8.225."
it seems to be caused by [email protected] requires [email protected]
@okatatuki okatatuki linked a pull request Dec 19, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant