Use full Python version for GitHub Actions cache key (#1373)

This commit is contained in:
Micah Jerome Ellison 2021-11-13 14:52:42 -08:00 committed by GitHub
parent 55dd9484c9
commit 5e45f305ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,11 +45,14 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: poetry cache # Change CACHE_STRING secret to bust the cache. Useful with minor Python version changes. - name: Capture full Python version in env
run: echo "PYTHON_FULL_VERSION=$(python --version)" >> $GITHUB_ENV
- name: poetry cache # Change CACHE_STRING secret to bust the cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: .venv path: .venv
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-${{ secrets.CACHE_STRING }} key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ env.PYTHON_FULL_VERSION }}-${{ secrets.CACHE_STRING }}
- name: Install dependencies - name: Install dependencies
run: | run: |