try to fix dependency-update workflow

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-01-13 13:26:38 +01:00
parent b5f9c860b5
commit 5beb3965bf
3 changed files with 12 additions and 15 deletions

View file

@ -11,24 +11,21 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: nanasess/setup-php@master
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: apcu
- name: Run dependency update script
run: |
set -x
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
cd ./php
composer update
set +e
ALL_LINES="$(composer outdated | grep -v "psr/container\|^$\|Direct dependencies\|Everything up to date\|Transitive dependencies")"
ALL_LINES="$(composer outdated | grep -v "^$\|php-di/php-di\|psr/container\|Direct dependencies\|Everything up to date\|Transitive dependencies")"
set -e
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}')"
composer require "$(echo "$CURRENT_LINE" | awk '{print $1}')" "^$(echo "$CURRENT_LINE" | awk '{print $4}')" --with-all-dependencies
ALL_LINES="$(echo "$ALL_LINES" | sed '1d')"
done
echo "outdated dependencies: