--- name: "Cache" on: workflow_call: jobs: molecule: name: cache runs-on: macos-13 env: PYTHON_VERSION: "3.11" steps: - name: Check out the codebase uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v3 2.5.0 with: ref: ${{ github.event.pull_request.head.sha }} - name: Cache Vagrant boxes uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: | ~/.vagrant.d/boxes key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} restore-keys: | vagrant-boxes - name: Update Homebrew run: | brew update --preinstall ls -l "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/" cat "" > .github/brew-formulae - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: path: | ~/Library/Caches/Homebrew/virtualbox--* ~/Library/Caches/Homebrew/vagrant--* ~/Library/Caches/Homebrew/downloads/*--virtualbox-* ~/Library/Caches/Homebrew/downloads/*--vagrant-* key: brew-${{ hashFiles('.github/brew-formulae') }} restore-keys: brew- - name: Install Homebrew dependencies run: | env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant