Skip to content

Commit ef0c988

Browse files
committed
update condition
1 parent e6b55ab commit ef0c988

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -390,14 +390,16 @@ jobs:
390390
# Install Python and Ansible dependencies if cache misses
391391
- name: Install Python requirements
392392
run: |
393-
if pip install --upgrade --dry-run -r .github/requirements-ci.txt | grep -q "Would install" && grep -q "^Would install pyavd-"; then
394-
echo "Dependencies are outdated. Installing/upgrading..."
393+
if pip install --upgrade --dry-run -r .github/requirements-ci.txt | grep -q "Would install"; then
394+
packages_to_upgrade=$(pip install --upgrade --dry-run -r .github/requirements-ci.txt | grep "Would install" | grep -oP "(?<=Would install ).*")
395+
# Now, you can process or print the packages to be upgraded
396+
echo "Packages to be upgraded: $packages_to_upgrade"
397+
# Add additional conditions or steps if necessary
395398
pip install --cache-dir ~/.cache/pip -r .github/requirements-ci.txt --upgrade
396399
pip install --cache-dir ~/.cache/ansible-core "ansible-core<2.19.0"
397-
else
398-
echo "Dependencies are up-to-date. Skipping installation."
399400
fi
400401
402+
401403
# Run ansible-test sanity
402404
- name: Run ansible-test sanity
403405
run: |

0 commit comments

Comments
 (0)