GitHub Actions: update cache key to include interpreter path
And make it more portable by using python
@@ -56,7 +56,7 @@ jobs:
${{ runner.os }}-pip-
${{ runner.os }}-
- name: set PY
- run: echo "::set-env name=PY::$(python -VV | sha256sum | cut -d' ' -f1)"
+ run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
