mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 14:06:50 +00:00
91 lines
3.3 KiB
YAML
91 lines
3.3 KiB
YAML
# Inspired by https://github.com/nextcloud/docker/blob/master/.github/workflows/update-sh.yml
|
|
name: nextcloud-update
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '00 12 * * *'
|
|
|
|
jobs:
|
|
run_update_sh:
|
|
name: Run nextcloud-update script
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'nextcloud/all-in-one'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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 \
|
|
| grep -viE -- 'rc|b' \
|
|
| sed -E 's/^v//' \
|
|
| sort -V \
|
|
| tail -1
|
|
)"
|
|
sed -i "s|\(pecl install[^;]*APCu-\)[0-9.]*|\1$apcu_version|" ./Containers/nextcloud/Dockerfile
|
|
|
|
# Memcached
|
|
memcached_version="$(
|
|
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
|
|
| cut -d/ -f3 \
|
|
| grep -viE -- 'rc|b' \
|
|
| sed -E 's/^[rv]//' \
|
|
| sort -V \
|
|
| tail -1
|
|
)"
|
|
sed -i "s|\(pecl install[^;]*memcached-\)[0-9.]*|\1$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-\)[0-9.]*|\1$redis_version|" ./Containers/nextcloud/Dockerfile
|
|
|
|
# Imagick
|
|
imagick_version="$(
|
|
git ls-remote --tags https://github.com/imagick/imagick.git \
|
|
| cut -d/ -f3 \
|
|
| grep -viE '[a-z]' \
|
|
| tr -d '^{}' \
|
|
| sort -V \
|
|
| tail -1
|
|
)"
|
|
sed -i "s|\(pecl install[^;]*imagick-\)[0-9.]*|\1$imagick_version|" ./Containers/nextcloud/Dockerfile
|
|
|
|
# Igbinary
|
|
igbinary_version="$(
|
|
git ls-remote --tags https://github.com/igbinary/igbinary.git \
|
|
| cut -d/ -f3 \
|
|
| grep -viE '[a-z]' \
|
|
| tr -d '^{}' \
|
|
| sort -V \
|
|
| tail -1
|
|
)"
|
|
sed -i "s|\(pecl install[^;]*igbinary-\)[0-9.]*|\1$igbinary_version|" ./Containers/nextcloud/Dockerfile
|
|
|
|
# Nextcloud
|
|
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)
|
|
if [ -n "$NCVERSION" ]; then
|
|
sed -i "s|^ENV NEXTCLOUD_VERSION.*|ENV NEXTCLOUD_VERSION=$NCVERSION|" ./Containers/nextcloud/Dockerfile
|
|
fi
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
|
|
with:
|
|
commit-message: nextcloud-update automated change
|
|
signoff: true
|
|
title: Nextcloud dependency update
|
|
body: Automated Nextcloud container update
|
|
labels: dependencies, 3. to review
|
|
milestone: next
|
|
branch: nextcloud-container-update
|