2022-01-09 23:59:50 +08:00
|
|
|
# Inspired by https://github.com/nextcloud/docker/blob/master/.github/workflows/update-sh.yml
|
|
|
|
name: nextcloud-update
|
|
|
|
|
|
|
|
on:
|
2022-12-08 22:02:41 +08:00
|
|
|
workflow_dispatch:
|
2022-01-09 23:59:50 +08:00
|
|
|
schedule:
|
|
|
|
- cron: '00 12 * * *'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run_update_sh:
|
|
|
|
name: Run nextcloud-update script
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 20:29:01 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-09 23:59:50 +08:00
|
|
|
- name: Run nextcloud-update script
|
|
|
|
run: |
|
|
|
|
# Inspired by https://github.com/nextcloud/docker/blob/master/update.sh
|
|
|
|
|
|
|
|
# APCU
|
|
|
|
apcu_version="$(
|
|
|
|
git ls-remote --tags https://github.com/krakjoe/apcu.git \
|
|
|
|
| cut -d/ -f3 \
|
2022-04-23 00:00:35 +08:00
|
|
|
| grep -viE -- 'rc|b' \
|
2022-01-09 23:59:50 +08:00
|
|
|
| sed -E 's/^v//' \
|
|
|
|
| sort -V \
|
|
|
|
| tail -1
|
|
|
|
)"
|
|
|
|
sed -i "s|pecl install APCu.*\;|pecl install APCu-$apcu_version\;|" ./Containers/nextcloud/Dockerfile
|
|
|
|
|
|
|
|
# Memcached
|
|
|
|
memcached_version="$(
|
|
|
|
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
|
|
|
|
| cut -d/ -f3 \
|
2022-04-23 00:00:35 +08:00
|
|
|
| grep -viE -- 'rc|b' \
|
2022-01-09 23:59:50 +08:00
|
|
|
| sed -E 's/^[rv]//' \
|
|
|
|
| sort -V \
|
|
|
|
| tail -1
|
|
|
|
)"
|
|
|
|
sed -i "s|pecl install memcached.*\;|pecl install memcached-$memcached_version\;|" ./Containers/nextcloud/Dockerfile
|
|
|
|
|
|
|
|
# Redis
|
|
|
|
redis_version="$(
|
|
|
|
git ls-remote --tags https://github.com/phpredis/phpredis.git \
|
|
|
|
| cut -d/ -f3 \
|
|
|
|
| grep -viE '[a-z]' \
|
|
|
|
| tr -d '^{}' \
|
|
|
|
| sort -V \
|
|
|
|
| tail -1
|
|
|
|
)"
|
|
|
|
sed -i "s|pecl install redis.*\;|pecl install redis-$redis_version\;|" ./Containers/nextcloud/Dockerfile
|
|
|
|
|
|
|
|
# Imagick
|
|
|
|
imagick_version="$(
|
|
|
|
git ls-remote --tags https://github.com/mkoppanen/imagick.git \
|
|
|
|
| cut -d/ -f3 \
|
|
|
|
| grep -viE '[a-z]' \
|
|
|
|
| tr -d '^{}' \
|
|
|
|
| sort -V \
|
|
|
|
| tail -1
|
|
|
|
)"
|
2022-12-29 20:05:54 +08:00
|
|
|
sed -i "s|pecl install imagick.*\;|pecl install imagick-$imagick_version\;|" ./Containers/nextcloud/Dockerfile
|
2022-11-09 04:38:31 +08:00
|
|
|
|
2022-01-09 23:59:50 +08:00
|
|
|
# Nextcloud
|
2022-05-03 20:59:57 +08:00
|
|
|
NC_MAJOR="$(grep "ENV NEXTCLOUD_VERSION" ./Containers/nextcloud/Dockerfile | grep -oP '[23][0-9]')"
|
|
|
|
NCVERSION=$(curl -s -m 900 https://download.nextcloud.com/server/releases/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | grep "$NC_MAJOR" | sort --version-sort | tail -1)
|
2023-08-28 21:05:57 +08:00
|
|
|
if [ -n "$NCVERSION" ]; then
|
|
|
|
sed -i "s|^ENV NEXTCLOUD_VERSION.*|ENV NEXTCLOUD_VERSION $NCVERSION|" ./Containers/nextcloud/Dockerfile
|
|
|
|
fi
|
2022-01-09 23:59:50 +08:00
|
|
|
|
|
|
|
- name: Create Pull Request
|
2023-04-05 21:00:25 +08:00
|
|
|
uses: peter-evans/create-pull-request@v5
|
2022-01-11 00:36:44 +08:00
|
|
|
with:
|
2022-01-09 23:59:50 +08:00
|
|
|
commit-message: nextcloud-update automated change
|
|
|
|
signoff: true
|
2023-09-11 16:30:47 +08:00
|
|
|
title: Nextcloud dependency update
|
2022-01-09 23:59:50 +08:00
|
|
|
body: Automated Nextcloud container update
|
2023-04-27 21:16:58 +08:00
|
|
|
labels: dependencies, 3. to review
|
2022-01-09 23:59:50 +08:00
|
|
|
milestone: next
|
2022-01-18 21:30:47 +08:00
|
|
|
branch: nextcloud-container-update
|