@@ -11,7 +11,7 @@ name: Update nextcloud/ocp
1111on :
1212 workflow_dispatch :
1313 schedule :
14- - cron : " 5 2 * * 0"
14+ - cron : ' 5 2 * * 0'
1515
1616permissions :
1717 contents : read
@@ -26,22 +26,21 @@ jobs:
2626 matrix :
2727 branches :
2828 - ${{ github.event.repository.default_branch }}
29- - ' stable33'
30- - ' stable32'
3129
3230 name : update-nextcloud-ocp-${{ matrix.branches }}
3331
3432 steps :
35- - id : checkout
36- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3734 with :
3835 persist-credentials : false
3936 ref : ${{ matrix.branches }}
4037 submodules : true
41- continue-on-error : true
38+
39+ - name : Get version matrix
40+ id : versions
41+ uses : icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
4242
4343 - name : Set up php8.2
44- if : steps.checkout.outcome == 'success'
4544 uses : shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
4645 with :
4746 php-version : 8.2
@@ -52,65 +51,45 @@ jobs:
5251 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5352
5453 - name : Read codeowners
55- if : steps.checkout.outcome == 'success'
5654 id : codeowners
5755 run : |
5856 grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT
5957 continue-on-error : true
6058
6159 - name : Composer install
62- if : steps.checkout.outcome == 'success'
6360 run : composer install
6461
65- - name : Composer update nextcloud/ocp # zizmor: ignore[template-injection]
66- id : update_branch
67- if : ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }}
68- run : composer require --dev 'nextcloud/ocp:dev-${{ matrix.branches }}'
69-
70- - name : Raise on issue on failure
71- uses : dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
72- if : ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
73- with :
74- token : ${{ secrets.GITHUB_TOKEN }}
75- title : ' Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}'
76- 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 }}'
77-
7862 - name : Composer update nextcloud/ocp
79- id : update_main
80- if : ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }}
81- run : composer require --dev nextcloud/ocp:dev-master
63+ id : update_branch
64+ run : composer bin nextcloud-ocp require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-min }}
8265
8366 - name : Raise on issue on failure
8467 uses : dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
85- if : ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main .conclusion == 'failure' }}
68+ if : ${{ failure() && steps.update_branch .conclusion == 'failure' }}
8669 with :
8770 token : ${{ secrets.GITHUB_TOKEN }}
88- title : ' Failed to update nextcloud/ocp package on branch ${{ matrix.branches }} '
71+ title : ' Failed to update nextcloud/ocp package'
8972 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 }}'
9073
9174 - name : Reset checkout 3rdparty
92- if : steps.checkout.outcome == 'success'
9375 run : |
9476 git clean -f 3rdparty
9577 git checkout 3rdparty
9678 continue-on-error : true
9779
9880 - name : Reset checkout vendor
99- if : steps.checkout.outcome == 'success'
10081 run : |
10182 git clean -f vendor
10283 git checkout vendor
10384 continue-on-error : true
10485
10586 - name : Reset checkout vendor-bin
106- if : steps.checkout.outcome == 'success'
10787 run : |
10888 git clean -f vendor-bin
10989 git checkout vendor-bin
11090 continue-on-error : true
11191
11292 - name : Create Pull Request
113- if : steps.checkout.outcome == 'success'
11493 uses : peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
11594 with :
11695 token : ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env]
0 commit comments