Skip to content

Commit

Permalink
workflows/tests: tweak caching (Homebrew#54369)
Browse files Browse the repository at this point in the history
Avoid setup.rb being incorrectly cached.
  • Loading branch information
MikeMcQuaid authored May 7, 2020
1 parent 0b6f47c commit d81fea0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
echo "::add-path::$HOMEBREW_PREFIX/bin"
fi
GEMS_PATH="$HOMEBREW_REPOSITORY/Library/Homebrew/vendor/bundle/"
GEMS_PATH="$HOMEBREW_REPOSITORY/Library/Homebrew/vendor/bundle/ruby/"
echo "::set-output name=gems-path::$GEMS_PATH"
GEMS_HASH=$(shasum -a 256 "$HOMEBREW_REPOSITORY/Library/Homebrew/Gemfile.lock" | cut -f1 -d' ')
echo "::set-output name=gems-hash::$GEMS_HASH"
Expand Down Expand Up @@ -67,8 +67,8 @@ jobs:
uses: actions/cache@v1
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-gems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-gems-
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit d81fea0

Please sign in to comment.