From f767c32bf8f2e46564bfe7f336021d1df799257d Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 21 Jan 2024 16:09:59 -0600 Subject: [PATCH] fix(ci): adjusting cache steps --- .github/workflows/cache.yml | 5 ++--- .github/workflows/test.yml | 5 ++--- Brewfile | 5 +++++ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 Brewfile diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index afb6f70..02f2fe8 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9fcd6f..7a41f23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000..49d4e96 --- /dev/null +++ b/Brewfile @@ -0,0 +1,5 @@ +tap "homebrew/bundle" +tap "homebrew/cask-versions" +cask "virtualbox" +cask "vagrant" +cask "vagrant-manager"