2022-01-14 06:25:53 +08:00
|
|
|
name: dependency-updates
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '00 12 * * *'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
dependency_updates:
|
|
|
|
name: Run dependency update script
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: nanasess/setup-php@master
|
|
|
|
with:
|
|
|
|
php-version: '8.0'
|
|
|
|
- name: Run dependency update script
|
|
|
|
run: |
|
2022-01-29 20:26:23 +08:00
|
|
|
set -x
|
2022-01-14 06:25:53 +08:00
|
|
|
curl -sS https://getcomposer.org/installer | php
|
|
|
|
mv composer.phar /usr/local/bin/composer
|
|
|
|
chmod +x /usr/local/bin/composer
|
|
|
|
cd ./php
|
|
|
|
composer update
|
|
|
|
ALL_LINES="$(composer outdated | grep -v "psr/container")"
|
2022-01-31 20:24:57 +08:00
|
|
|
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
|
2022-01-14 06:25:53 +08:00
|
|
|
echo "outdated dependencies:
|
|
|
|
$(composer outdated)"
|
|
|
|
- name: Create Pull Request
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
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
|
2022-01-18 21:30:47 +08:00
|
|
|
branch: aio-dependency-update
|