all-in-one/.github/workflows/dependency-updates.yml
szaimen 73924df349 fix pecl dependency update regex
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-04-22 18:00:35 +02:00

55 lines
1.7 KiB
YAML

name: dependency-updates
on:
schedule:
- cron: '00 12 * * *'
jobs:
dependency_updates:
name: Run dependency update script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nanasess/setup-php@master
with:
php-version: '8.0'
- 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")"
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}')"
ALL_LINES="$(echo "$ALL_LINES" | sed '1d')"
done
echo "outdated dependencies:
$(composer outdated)"
- name: Update apcu
run: |
# APCU
apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
| grep -viE -- 'rc|b' \
| sed -E 's/^v//' \
| sort -V \
| tail -1
)"
sed -i "s|pecl install APCu.*\;|pecl install APCu-$apcu_version\;|" ./Containers/mastercontainer/Dockerfile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: dependency updates
signoff: true
title: Dependency updates
body: Automated dependency updates since dependabot does not support grouped updates
labels: dependencies, enhancement
milestone: next
branch: aio-dependency-update