From 12aa87787feb02cac93dcf4a6cfa98f8a12d742c Mon Sep 17 00:00:00 2001 From: "Daniel W. Anner" Date: Wed, 19 Jul 2023 13:40:36 -0400 Subject: [PATCH] Create build-cache.yml --- .github/workflows/build-cache.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-cache.yml diff --git a/.github/workflows/build-cache.yml b/.github/workflows/build-cache.yml new file mode 100644 index 00000000..766cdf68 --- /dev/null +++ b/.github/workflows/build-cache.yml @@ -0,0 +1,31 @@ +--- +name: update-cache +on: + push: + branches: + - master +jobs: + build-cache: + name: Build Cache + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v4 + id: setup_python + with: + python-version: '3.8' + - name: cache virtualenv + uses: actions/cache@v3 + id: cache-venv + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} + restore-keys: | + ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}- + - name: Install dependencies + shell: bash + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + if: steps.cache-venv.outputs.cache-hit != 'true'