My company has an internal gem. It's common practice to create a PR for the gem, then also create a PR for a Rails app that uses the gem. While the gem is still being PRed, the Gemfile line includes , git: 'url_to_gem', branch: 'branch-name' on the gem line. This allows our CI to install the gem from git, and see that everything end-to-end is working. Once the gem PR gets merged and version bumped, you get rid of the git/branch parts and just use the latest version from the gem server (GitHub Packages).
Today we ran into this interesting error in the Rails app. We recently switched from manual actions caches to the bundler-cache: true option. Now we're running into this (which does not occur on our local machines):
Failing log lines
Found cache for key: setup-ruby-bundler-cache-v3-ubuntu-16.04-ruby-2.5.1-Gemfile.lock-4df73a010035f3baf6748b02b8f750288aceaf4ffd78f98ca0877135bf64a6f4
/opt/hostedtoolcache/Ruby/2.5.1/x64/bin/bundle install --jobs 4
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the
/home/runner/work/reponame/reponame/Gemfile freeze
by running `bundle config --delete deployment`.
The list of sources changed
You have added to the Gemfile:
* source:
https://machineuser@github.com/org/gemname.git (at
branchname)
You have deleted from the Gemfile:
* source:
https://machineuser@github.com/org/gemname.git (at
branchname@56c6708)
Took 2.14 seconds
Workflow YML
strategy:
fail-fast: false
matrix:
os: [ ubuntu-16.04 ]
ruby: [ .ruby-version ]
runs-on: ${{ matrix.os }}
env:
BUNDLE_RUBYGEMS__PKG__GITHUB__COM: ${{ secrets.GH_GEMS_AUTH }}
RAILS_ENV: test
EAGER_LOAD: 1
steps:
- uses: actions/checkout@v2
- run: sudo apt-get -y install libpq-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
My company has an internal gem. It's common practice to create a PR for the gem, then also create a PR for a Rails app that uses the gem. While the gem is still being PRed, the Gemfile line includes
, git: 'url_to_gem', branch: 'branch-name'on thegemline. This allows our CI to install the gem from git, and see that everything end-to-end is working. Once the gem PR gets merged and version bumped, you get rid of the git/branch parts and just use the latest version from the gem server (GitHub Packages).Today we ran into this interesting error in the Rails app. We recently switched from manual actions caches to the
bundler-cache: trueoption. Now we're running into this (which does not occur on our local machines):Failing log lines
Workflow YML