Skip to content

Commit 73bce1f

Browse files
committed
chore: Compatibility with 33
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 7b6f53f commit 73bce1f

5 files changed

Lines changed: 57 additions & 52 deletions

File tree

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,42 @@ permissions:
1818
contents: read
1919

2020
jobs:
21-
static-analysis:
22-
runs-on: ubuntu-latest
23-
24-
name: static-psalm-analysis
21+
matrix:
22+
runs-on: ubuntu-latest-low
23+
outputs:
24+
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
2525
steps:
26-
- name: Checkout
26+
- name: Checkout app
2727
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828
with:
2929
persist-credentials: false
3030

31-
- name: Get php version
31+
- name: Get version matrix
3232
id: versions
3333
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3434

3535
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
3636
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
3737

38-
- name: Set up php${{ steps.versions.outputs.php-available }}
38+
static-analysis:
39+
runs-on: ubuntu-latest
40+
needs: matrix
41+
strategy:
42+
# do not stop on another job's failure
43+
fail-fast: false
44+
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
45+
46+
name: static-psalm-analysis ${{ matrix.ocp-version }}
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
50+
with:
51+
persist-credentials: false
52+
53+
- name: Set up php${{ matrix.php-min }}
3954
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
4055
with:
41-
php-version: ${{ steps.versions.outputs.php-available }}
56+
php-version: ${{ matrix.php-min }}
4257
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
4358
coverage: none
4459
ini-file: development
@@ -55,8 +70,20 @@ jobs:
5570
- name: Check for vulnerable PHP dependencies
5671
run: composer require --dev roave/security-advisories:dev-latest
5772

58-
- name: Install nextcloud/ocp
59-
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
73+
- name: Install dependencies # zizmor: ignore[template-injection]
74+
run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies
6075

6176
- name: Run coding standards check
6277
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github
78+
79+
summary:
80+
runs-on: ubuntu-latest-low
81+
needs: static-analysis
82+
83+
if: always()
84+
85+
name: static-psalm-analysis-summary
86+
87+
steps:
88+
- name: Summary status
89+
run: if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi

.github/workflows/update-nextcloud-ocp.yml renamed to .github/workflows/update-nextcloud-ocp-matrix.yml

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name: Update nextcloud/ocp
1111
on:
1212
workflow_dispatch:
1313
schedule:
14-
- cron: "5 2 * * 0"
14+
- cron: '5 2 * * 0'
1515

1616
permissions:
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]

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
<dependencies>
28-
<nextcloud min-version="33" max-version="34"/>
28+
<nextcloud min-version="33" max-version="33"/>
2929
</dependencies>
3030

3131
<background-jobs>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require-dev": {
3-
"nextcloud/ocp": "dev-master"
3+
"nextcloud/ocp": "dev-stable33"
44
}
55
}

vendor-bin/nextcloud-ocp/composer.lock

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)