From 01d62186d2a347221c2368357cd28e9cb0de2994 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 7 Apr 2026 16:14:47 +0200 Subject: [PATCH 1/5] ci(nextcloud-ocp): Unify the update path for nextcloud/ocp Signed-off-by: Joas Schilling --- .github/workflows/update-nextcloud-ocp.yml | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 9f219e8..57e9fac 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -62,27 +62,33 @@ jobs: if: steps.checkout.outcome == 'success' run: composer install - - name: Composer update nextcloud/ocp # zizmor: ignore[template-injection] - id: update_branch - if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }} - run: composer bin nextcloud-ocp require --dev 'nextcloud/ocp:dev-${{ matrix.branches }}' - - - name: Raise on issue on failure - uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0 - if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }} + - name: Check composer bin for nextcloud/ocp exists + id: check_composer_bin + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 with: - token: ${{ secrets.GITHUB_TOKEN }} - title: 'Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}' - body: 'Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }}' + files: vendor-bin/nextcloud-ocp/composer.json - name: Composer update nextcloud/ocp - id: update_main - if: ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }} - run: composer bin nextcloud-ocp require --dev nextcloud/ocp:dev-master + id: update_branch + env: + USE_COMPOSER_BIN: ${{ steps.check_files.outputs.files_exists }} + BRANCH_NAME: ${{ matrix.branches }} + run: | + COMPOSER_CMD='composer' + if [ $USE_COMPOSER_BIN == 'true' ]; then + COMPOSER_CMD='composer bin nextcloud-ocp' + fi + + PACKAGE_VERSION="nextcloud/ocp:dev-$BRANCH_NAME" + if [ $BRANCH_NAME == 'main' ]; then + PACKAGE_VERSION='nextcloud/ocp:dev-master' + fi + + $COMPOSER_CMD require --dev $PACKAGE_VERSION - name: Raise on issue on failure uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0 - if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }} + if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }} with: token: ${{ secrets.GITHUB_TOKEN }} title: 'Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}' From 6df13284eee1b444123298f34bc11770727db536 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 7 Apr 2026 16:23:44 +0200 Subject: [PATCH 2/5] fixup! ci(nextcloud-ocp): Unify the update path for nextcloud/ocp --- .github/workflows/update-nextcloud-ocp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 57e9fac..24ed1b1 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -75,12 +75,12 @@ jobs: BRANCH_NAME: ${{ matrix.branches }} run: | COMPOSER_CMD='composer' - if [ $USE_COMPOSER_BIN == 'true' ]; then + if [[ "$USE_COMPOSER_BIN" == 'true' ]]; then COMPOSER_CMD='composer bin nextcloud-ocp' fi PACKAGE_VERSION="nextcloud/ocp:dev-$BRANCH_NAME" - if [ $BRANCH_NAME == 'main' ]; then + if [[ "$BRANCH_NAME" == 'main' ]]; then PACKAGE_VERSION='nextcloud/ocp:dev-master' fi From cff96391030b2e3751d001e6d7835d65365128e7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 7 Apr 2026 16:26:58 +0200 Subject: [PATCH 3/5] fixup! fixup! ci(nextcloud-ocp): Unify the update path for nextcloud/ocp --- .github/workflows/update-nextcloud-ocp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 24ed1b1..648a18b 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -84,6 +84,7 @@ jobs: PACKAGE_VERSION='nextcloud/ocp:dev-master' fi + echo $COMPOSER_CMD require --dev $PACKAGE_VERSION $COMPOSER_CMD require --dev $PACKAGE_VERSION - name: Raise on issue on failure From 7398b5f4ce7592ddaf25d589ae98c5971a5ee371 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 7 Apr 2026 16:28:37 +0200 Subject: [PATCH 4/5] fixup! fixup! fixup! ci(nextcloud-ocp): Unify the update path for nextcloud/ocp --- .github/workflows/update-nextcloud-ocp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 648a18b..1943d1a 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -71,7 +71,7 @@ jobs: - name: Composer update nextcloud/ocp id: update_branch env: - USE_COMPOSER_BIN: ${{ steps.check_files.outputs.files_exists }} + USE_COMPOSER_BIN: ${{ steps.check_composer_bin.outputs.files_exists }} BRANCH_NAME: ${{ matrix.branches }} run: | COMPOSER_CMD='composer' From 6225a3bf7a4b62f8fe7b910ebd2e82eb4e516831 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 7 Apr 2026 16:39:16 +0200 Subject: [PATCH 5/5] fixup! fixup! fixup! fixup! ci(nextcloud-ocp): Unify the update path for nextcloud/ocp --- .github/workflows/update-nextcloud-ocp.yml | 28 ++++++---------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 1943d1a..22a786f 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -95,27 +95,6 @@ jobs: title: 'Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}' body: 'Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }}' - - name: Reset checkout 3rdparty - if: steps.checkout.outcome == 'success' - run: | - git clean -f 3rdparty - git checkout 3rdparty - continue-on-error: true - - - name: Reset checkout vendor - if: steps.checkout.outcome == 'success' - run: | - git clean -f vendor - git checkout vendor - continue-on-error: true - - - name: Reset checkout vendor-bin - if: steps.checkout.outcome == 'success' - run: | - git clean -f vendor-bin - git checkout vendor-bin - continue-on-error: true - - name: Create Pull Request if: steps.checkout.outcome == 'success' uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 @@ -127,6 +106,13 @@ jobs: signoff: true branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp' title: '[${{ matrix.branches }}] Update nextcloud/ocp dependency' + add-path: | + composer.json + composer.lock + vendor-bin/nextcloud-ocp2/composer.json + vendor-bin/nextcloud-ocp2/composer.lock + vendor-bin/nextcloud-ocp/composer.json + vendor-bin/nextcloud-ocp/composer.lock body: | Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency labels: |