Skip to content

Commit 0c1fe3e

Browse files
authored
Merge pull request #343 from nextcloud/dependency-update
Update node, workflows, and php dependencies
2 parents 903fd88 + 707b5cb commit 0c1fe3e

File tree

13 files changed

+2600
-4057
lines changed

13 files changed

+2600
-4057
lines changed

.github/workflows/appstore-build-publish.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3636
3737
- name: Checkout
38-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3939
with:
4040
persist-credentials: false
4141
path: ${{ env.APP_NAME }}
4242

4343
- name: Get app version number
4444
id: app-version
45-
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
45+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4646
with:
4747
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4848
expression: "//info//version/text()"
@@ -53,7 +53,7 @@ jobs:
5353
5454
- name: Get appinfo data
5555
id: appinfo
56-
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
5757
with:
5858
filename: ${{ env.APP_NAME }}/appinfo/info.xml
5959
expression: "//info//dependencies//nextcloud/@min-version"
@@ -65,13 +65,13 @@ jobs:
6565
continue-on-error: true
6666
with:
6767
path: ${{ env.APP_NAME }}
68-
fallbackNode: '^20'
69-
fallbackNpm: '^10'
68+
fallbackNode: '^24'
69+
fallbackNpm: '^11.3'
7070

7171
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
7272
# Skip if no package.json
7373
if: ${{ steps.versions.outputs.nodeVersion }}
74-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
74+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
7575
with:
7676
node-version: ${{ steps.versions.outputs.nodeVersion }}
7777

@@ -87,7 +87,7 @@ jobs:
8787
filename: ${{ env.APP_NAME }}/appinfo/info.xml
8888

8989
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
90-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
90+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
9191
with:
9292
php-version: ${{ steps.php-versions.outputs.php-min }}
9393
coverage: none
@@ -140,50 +140,58 @@ jobs:
140140
cd ${{ env.APP_NAME }}
141141
make appstore
142142
143-
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
144-
continue-on-error: true
145-
id: server-checkout
143+
- name: Check server download link for ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
146144
run: |
147145
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
148-
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
149-
unzip latest-$NCVERSION.zip
146+
DOWNLOAD_URL=$(curl -s "https://updates.nextcloud.com/updater_server/latest?channel=beta&version=$NCVERSION" | jq -r '.downloads.zip[0]')
147+
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
148+
149+
- name: Download server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
150+
continue-on-error: true
151+
id: server-download
152+
if: ${{ env.DOWNLOAD_URL != 'null' }}
153+
run: |
154+
echo "Downloading release tarball from $DOWNLOAD_URL"
155+
wget $DOWNLOAD_URL -O nextcloud.zip
156+
unzip nextcloud.zip
150157
151158
- name: Checkout server master fallback
152-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
153-
if: ${{ steps.server-checkout.outcome != 'success' }}
159+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
160+
if: ${{ steps.server-download.outcome != 'success' }}
154161
with:
155162
persist-credentials: false
156163
submodules: true
157164
repository: nextcloud/server
158165
path: nextcloud
159166

167+
160168
- name: Sign app
161169
run: |
162170
# Extracting release
163-
cd ${{ env.APP_NAME }}/build/artifacts/appstore
171+
cd ${{ env.APP_NAME }}/build/artifacts
164172
tar -xvf ${{ env.APP_NAME }}.tar.gz
165-
cd ../../../../
173+
cd ../../../
166174
# Setting up keys
167175
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
168176
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
169177
# Signing
170-
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}
178+
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
171179
# Rebuilding archive
172-
cd ${{ env.APP_NAME }}/build/artifacts/appstore
180+
cd ${{ env.APP_NAME }}/build/artifacts
173181
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
174182
175183
- name: Attach tarball to github release
176-
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
184+
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2.11.3
177185
id: attach_to_release
178186
with:
179187
repo_token: ${{ secrets.GITHUB_TOKEN }}
180-
file: ${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}.tar.gz
188+
file: ${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}.tar.gz
181189
asset_name: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}.tar.gz
182190
tag: ${{ github.ref }}
183191
overwrite: true
184192

185193
- name: Upload app to Nextcloud appstore
186-
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
194+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
187195
with:
188196
app_name: ${{ env.APP_NAME }}
189197
appstore_token: ${{ secrets.APPSTORE_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6060
with:
6161
persist-credentials: false
6262

6363
- name: Read package.json node and npm engines version
6464
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
6565
id: versions
6666
with:
67-
fallbackNode: '^20'
68-
fallbackNpm: '^10'
67+
fallbackNode: '^24'
68+
fallbackNpm: '^11.3'
6969

7070
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
71-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
71+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
7272
with:
7373
node-version: ${{ steps.versions.outputs.nodeVersion }}
7474

.github/workflows/lint-info-xml.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
name: info.xml lint
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828
with:
2929
persist-credentials: false
3030

.github/workflows/lint-php-cs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
persist-credentials: false
3131

@@ -34,7 +34,7 @@ jobs:
3434
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3535

3636
- name: Set up php${{ steps.versions.outputs.php-min }}
37-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
37+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
3838
with:
3939
php-version: ${{ steps.versions.outputs.php-min }}
4040
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Install dependencies
4747
run: |
48-
composer remove nextcloud/ocp --dev
48+
composer remove nextcloud/ocp --dev --no-scripts
4949
composer i
5050
5151
- name: Lint

.github/workflows/lint-php.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88

99
name: Lint php
1010

11-
on:
12-
pull_request:
13-
push:
14-
branches:
15-
- main
16-
- master
17-
- stable*
11+
on: pull_request
1812

1913
permissions:
2014
contents: read
@@ -30,7 +24,7 @@ jobs:
3024
php-versions: ${{ steps.versions.outputs.php-versions }}
3125
steps:
3226
- name: Checkout app
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3428
with:
3529
persist-credentials: false
3630

@@ -49,12 +43,12 @@ jobs:
4943

5044
steps:
5145
- name: Checkout
52-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5347
with:
5448
persist-credentials: false
5549

5650
- name: Set up php ${{ matrix.php-versions }}
57-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
51+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
5852
with:
5953
php-version: ${{ matrix.php-versions }}
6054
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

.github/workflows/node.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,31 @@ jobs:
5353
name: NPM build
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5757
with:
5858
persist-credentials: false
5959

6060
- name: Read package.json node and npm engines version
6161
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
6262
id: versions
6363
with:
64-
fallbackNode: '^20'
65-
fallbackNpm: '^10'
64+
fallbackNode: '^24'
65+
fallbackNpm: '^11.3'
6666

6767
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
68-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
68+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
6969
with:
7070
node-version: ${{ steps.versions.outputs.nodeVersion }}
7171

7272
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
7373
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
7474

75+
- name: Validate package-lock.json # See https://github.com/npm/cli/issues/4460
76+
run: |
77+
npm i -g npm-package-lock-add-resolved@1.1.4
78+
npm-package-lock-add-resolved
79+
git --no-pager diff --exit-code
80+
7581
- name: Install dependencies & build
7682
env:
7783
CYPRESS_INSTALL_BINARY: 0
@@ -80,7 +86,7 @@ jobs:
8086
npm ci
8187
npm run build --if-present
8288
83-
- name: Check webpack build changes
89+
- name: Check build changes
8490
run: |
8591
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
8692

.github/workflows/pr-feedback.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
3737
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
3838
39-
- uses: nextcloud/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4 # main
39+
- uses: nextcloud/pr-feedback-action@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main
4040
with:
4141
feedback-message: |
4242
Hello there,
@@ -50,6 +50,6 @@ jobs:
5050
5151
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
5252
days-before-feedback: 14
53-
start-date: '2024-04-30'
53+
start-date: '2025-06-12'
5454
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
5555
exempt-bots: true

.github/workflows/psalm-matrix.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88

99
name: Static analysis
1010

11-
on:
12-
pull_request:
13-
push:
14-
branches:
15-
- main
16-
- master
17-
- stable*
11+
on: pull_request
1812

1913
concurrency:
2014
group: psalm-${{ github.head_ref || github.run_id }}
@@ -30,7 +24,7 @@ jobs:
3024
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
3125
steps:
3226
- name: Checkout app
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3428
with:
3529
persist-credentials: false
3630

@@ -52,14 +46,14 @@ jobs:
5246
name: static-psalm-analysis ${{ matrix.ocp-version }}
5347
steps:
5448
- name: Checkout
55-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5650
with:
5751
persist-credentials: false
5852

59-
- name: Set up php${{ matrix.php-versions }}
60-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
53+
- name: Set up php${{ matrix.php-min }}
54+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
6155
with:
62-
php-version: ${{ matrix.php-versions }}
56+
php-version: ${{ matrix.php-min }}
6357
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
6458
coverage: none
6559
ini-file: development
@@ -70,9 +64,11 @@ jobs:
7064

7165
- name: Install dependencies
7266
run: |
73-
composer remove nextcloud/ocp --dev
67+
composer remove nextcloud/ocp --dev --no-scripts
7468
composer i
7569
70+
- name: Check for vulnerable PHP dependencies
71+
run: composer require --dev roave/security-advisories:dev-latest
7672

7773
- name: Install dependencies # zizmor: ignore[template-injection]
7874
run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"require-dev": {
1515
"friendsofphp/php-cs-fixer": "^3",
16-
"nextcloud/coding-standard": "^1",
16+
"nextcloud/coding-standard": "^1.4",
1717
"psalm/phar": "6.7.x",
1818
"nextcloud/ocp": "dev-master"
1919
},

0 commit comments

Comments
 (0)