Skip to content

Commit dfd6a16

Browse files
authored
GitHub Actions: update cache key to include interpreter path (#7835)
And make it more portable by using python
1 parent 3487df5 commit dfd6a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/python-linters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
${{ runner.os }}-pip-
5757
${{ runner.os }}-
5858
- name: set PY
59-
run: echo "::set-env name=PY::$(python -VV | sha256sum | cut -d' ' -f1)"
59+
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
6060
- uses: actions/cache@v1
6161
with:
6262
path: ~/.cache/pre-commit

0 commit comments

Comments
 (0)