5
0
Fork 0
mirror of https://github.com/pre-commit/action.git synced 2025-11-07 10:46:56 +00:00

Merge pull request #14 from uranusjr/cache-key-python-impl

Use python -c to get the interpreter path hash
This commit is contained in:
Anthony Sottile 2020-03-09 07:21:24 -07:00 committed by GitHub
commit b9549d1fa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- name: set PY
run: echo "::set-env name=PY::$((python --version --version && which python) | 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