Skip to content

Commit

Permalink
fix(ci): adjusting cache steps
Browse files Browse the repository at this point in the history
  • Loading branch information
timothystewart6 committed Jan 21, 2024
1 parent 5cc46eb commit f767c32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,18 @@ jobs:
with:
path: |
~/Library/Caches/Homebrew
key: brew-${{ hashFiles('.github/brew-formulae') }}
key: brew-${{ hashFiles('./Brewfile') }}
restore-keys: brew-

- name: Update Homebrew
if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step
run: |
brew update --preinstall
echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae
- name: Install Homebrew dependencies
if: steps.cache-homebrew.outputs.cache-hit != 'true' # only run if false since this is just a cache step
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask virtualbox vagrant vagrant-manager
env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile
- name: Cache Vagrant boxes
id: cache-vagrant
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ jobs:
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
with:
path: ~/Library/Caches/Homebrew
key: brew-${{ hashFiles('.github/brew-formulae') }}
key: brew-${{ hashFiles('./Brewfile') }}

- name: Update Homebrew
run: |
brew update --preinstall
echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae
- name: Install Homebrew dependencies
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask virtualbox vagrant vagrant-manager
env HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --file ./Brewfile
- name: Restore vagrant Boxes cache
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
Expand Down
5 changes: 5 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tap "homebrew/bundle"
tap "homebrew/cask-versions"
cask "virtualbox"
cask "vagrant"
cask "vagrant-manager"

0 comments on commit f767c32

Please sign in to comment.