Skip to content

Commit

Permalink
Improve caching by using branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDaugherty committed Nov 4, 2020
1 parent 0f76489 commit ee5b52e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,15 @@ jobs:
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }}
key: ${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}-${{ hashFiles(format('gemfiles/{0}.gemfile', matrix.gemfile)) }}
restore-keys: |
${{ runner.os }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
${{ runner.os }}-ruby-${{ matrix.ruby }}
- name: Configure bundler
run: bundle config path vendor/bundle
${{ runner.os }}-branch-${{ github.ref }}-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
${{ runner.os }}-branch-master-ruby-${{ matrix.ruby }}-gemfile-${{ matrix.gemfile }}
- name: Bundle install
run: bundle install --jobs 4 --retry 3
run:
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

Expand Down

0 comments on commit ee5b52e

Please sign in to comment.