From dfd6a163bdb0e6675a47e2f092144319e847202f Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Mon, 9 Mar 2020 15:17:17 +0100 Subject: [PATCH] GitHub Actions: update cache key to include interpreter path (#7835) And make it more portable by using python --- .github/workflows/python-linters.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-linters.yml b/.github/workflows/python-linters.yml index 0b9bb0a2e..d5124e226 100644 --- a/.github/workflows/python-linters.yml +++ b/.github/workflows/python-linters.yml @@ -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