Skip to content

Commit 5e6be91

Browse files
committed
set output
1 parent 0388c77 commit 5e6be91

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/ci.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,22 @@ jobs:
3232
uses: actions/setup-python@v2
3333
with:
3434
python-version: ${{ matrix.python-version }}
35-
- name: Set PY
35+
- name: Set Variables
36+
id: set_variables
3637
run: |
37-
echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
38-
echo "PIP_CACHE=$(pip cache dir)" >> $GITHUB_ENV
38+
echo "::set-output name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
39+
echo "::set-output name=PIP_CACHE::$(pip cache dir)"
3940
- name: Cache PIP
4041
uses: actions/cache@v1
4142
with:
42-
path: ${{ env.PIP_CACHE }}
43-
key: ${{ runner.os }}-pip-${{ env.PY }}
43+
path: ${{ steps.set_variables.outputs.PIP_CACHE }}
44+
key: ${{ runner.os }}-pip-${{ steps.set_variables.outputs.PY }}
4445
- name: Cache PEP 582 packages
4546
uses: actions/cache@v1
4647
with:
4748
path: __pypackages__
4849
# Look to see if there is a cache hit for the corresponding requirements file
49-
key: ${{ runner.os }}-packages-${{ env.PY }}-${{ hashFiles('pdm.lock') }}
50+
key: ${{ runner.os }}-packages-${{ steps.set_variables.outputs.PY }}
5051
- name: Install Current PDM
5152
run: |
5253
pip install -U pip

0 commit comments

Comments
 (0)