Skip to content

Commit

Permalink
try to fix the workflow if there is no outdated dependency
Browse files Browse the repository at this point in the history
Signed-off-by: szaimen <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Jan 31, 2022
1 parent 20d631b commit 4e85276
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/dependency-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
cd ./php
composer update
ALL_LINES="$(composer outdated | grep -v "psr/container")"
while [ -n "$ALL_LINES" ]; do
CURRENT_LINE="$(echo "$ALL_LINES" | head -1)"
composer require "$(echo "$CURRENT_LINE" | awk '{print $1}')" "^$(echo "$CURRENT_LINE" | awk '{print $4}')"
ALL_LINES="$(echo "$ALL_LINES" | sed '1d')"
done
if [ -n "$ALL_LINES" ]; then
while [ -n "$ALL_LINES" ]; do
CURRENT_LINE="$(echo "$ALL_LINES" | head -1)"
composer require "$(echo "$CURRENT_LINE" | awk '{print $1}')" "^$(echo "$CURRENT_LINE" | awk '{print $4}')"
ALL_LINES="$(echo "$ALL_LINES" | sed '1d')"
done
fi
echo "outdated dependencies:
$(composer outdated)"
- name: Create Pull Request
Expand Down

0 comments on commit 4e85276

Please sign in to comment.