2024-04-25 08:03:54 +00:00
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
2024-07-13 08:15:40 +00:00
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
2024-04-25 08:03:54 +00:00
name : Update nextcloud/ocp
on :
workflow_dispatch :
schedule :
- cron : '5 2 * * 0'
jobs :
update-nextcloud-ocp :
runs-on : ubuntu-latest
strategy :
fail-fast : false
matrix :
2024-04-25 08:16:35 +00:00
branches : [ 'main' ]
target : [ 'stable29' ]
2024-04-25 08:03:54 +00:00
name : update-nextcloud-ocp-${{ matrix.branches }}
steps :
2024-07-13 08:15:40 +00:00
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2024-04-25 08:03:54 +00:00
with :
ref : ${{ matrix.branches }}
submodules : true
- name : Set up php8.2
2024-07-13 08:15:40 +00:00
uses : shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
2024-04-25 08:03:54 +00:00
with :
php-version : 8.2
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions : bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage : none
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
- name : Read codeowners
id : codeowners
run : |
grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT
continue-on-error : true
- name : Composer install
run : composer install
- name : Composer update nextcloud/ocp
id : update_branch
run : composer require --dev nextcloud/ocp:dev-${{ matrix.target }}
- name : Raise on issue on failure
uses : dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
if : ${{ failure() && steps.update_branch.conclusion == 'failure' }}
with :
token : ${{ secrets.GITHUB_TOKEN }}
title : Failed to update nextcloud/ocp package}
body : Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}
- name : Reset checkout 3rdparty
run : |
git clean -f 3rdparty
git checkout 3rdparty
continue-on-error : true
- name : Reset checkout vendor
run : |
git clean -f vendor
git checkout vendor
continue-on-error : true
- name : Reset checkout vendor-bin
run : |
git clean -f vendor-bin
git checkout vendor-bin
continue-on-error : true
- name : Create Pull Request
2024-07-13 08:15:40 +00:00
uses : peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
2024-04-25 08:03:54 +00:00
with :
token : ${{ secrets.COMMAND_BOT_PAT }}
2024-07-13 08:15:40 +00:00
commit-message: 'chore(dev-deps) : Bump nextcloud/ocp package'
2024-04-25 08:03:54 +00:00
committer : GitHub <noreply@github.com>
author : nextcloud-command <nextcloud-command@users.noreply.github.com>
signoff : true
2024-07-13 08:15:40 +00:00
branch : 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp'
title : '[${{ matrix.branches }}] Update nextcloud/ocp dependency'
2024-04-25 08:03:54 +00:00
body : |
Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency
labels : |
dependencies
3 . to review