Skip to content

Commit a6ffe24

Browse files
committed
add cache hit condtion in python-requirements job
1 parent 1426b34 commit a6ffe24

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/pull-request-management.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,16 @@ jobs:
110110
uses: actions/setup-python@v5
111111
with:
112112
python-version: ${{ matrix.python_version }}
113-
cache: 'pip'
113+
- name: Cache pip dependencies
114+
id: cache
115+
uses: actions/cache@v3
116+
with:
117+
path: ~/.cache/pip
118+
key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ hashFiles('.github/requirements-ci.txt', 'ansible_collections/arista/avd/requirements-dev.txt') }}
119+
restore-keys: |
120+
${{ runner.os }}-pip-
114121
- name: Install Python requirements
115-
if: steps.cache-ci.outputs.cache-hit != 'true' || steps.cache-dev.outputs.cache-hit != 'true'
122+
if: steps.cache.output.cache-hit != 'true'
116123
run: |
117124
pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
118125

0 commit comments

Comments
 (0)