Skip to content

Commit 1e5b13c

Browse files
authored
Merge pull request #84 from nextcloud/release-5.0.2
v5.0.2
2 parents 4b58401 + af62012 commit 1e5b13c

14 files changed

Lines changed: 2654 additions & 2375 deletions

File tree

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

Lines changed: 60 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Build and publish app release
710

811
on:
912
release:
1013
types: [published]
1114

12-
env:
13-
PHP_VERSION: 8.2
15+
permissions:
16+
contents: write
1417

1518
jobs:
1619
build_and_publish:
@@ -21,7 +24,7 @@ jobs:
2124

2225
steps:
2326
- name: Check actor permission
24-
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
27+
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
2528
with:
2629
require: write
2730

@@ -32,50 +35,68 @@ jobs:
3235
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3336
3437
- name: Checkout
35-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3639
with:
40+
persist-credentials: false
3741
path: ${{ env.APP_NAME }}
3842

43+
- name: Get app version number
44+
id: app-version
45+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
46+
with:
47+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
48+
expression: "//info//version/text()"
49+
50+
- name: Validate app version against tag
51+
run: |
52+
[ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
53+
3954
- name: Get appinfo data
4055
id: appinfo
41-
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
4257
with:
4358
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4459
expression: "//info//dependencies//nextcloud/@min-version"
4560

4661
- name: Read package.json node and npm engines version
47-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
62+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4863
id: versions
4964
# Continue if no package.json
5065
continue-on-error: true
5166
with:
5267
path: ${{ env.APP_NAME }}
53-
fallbackNode: "^16"
54-
fallbackNpm: "^7"
68+
fallbackNode: '^24'
69+
fallbackNpm: '^11.3'
5570

5671
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5772
# Skip if no package.json
5873
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
74+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
6075
with:
6176
node-version: ${{ steps.versions.outputs.nodeVersion }}
6277

6378
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
6479
# Skip if no package.json
6580
if: ${{ steps.versions.outputs.npmVersion }}
66-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
81+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
6782

68-
- name: Set up php ${{ env.PHP_VERSION }}
69-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
83+
- name: Get php version
84+
id: php-versions
85+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
7086
with:
71-
php-version: ${{ env.PHP_VERSION }}
87+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
88+
89+
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
90+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
91+
with:
92+
php-version: ${{ steps.php-versions.outputs.php-min }}
7293
coverage: none
7394
env:
7495
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7596

7697
- name: Check composer.json
7798
id: check_composer
78-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
99+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
79100
with:
80101
files: "${{ env.APP_NAME }}/composer.json"
81102

@@ -88,14 +109,16 @@ jobs:
88109
- name: Build ${{ env.APP_NAME }}
89110
# Skip if no package.json
90111
if: ${{ steps.versions.outputs.nodeVersion }}
112+
env:
113+
CYPRESS_INSTALL_BINARY: 0
91114
run: |
92115
cd ${{ env.APP_NAME }}
93116
npm ci
94-
npm run build
117+
npm run build --if-present
95118
96119
- name: Check Krankerl config
97120
id: krankerl
98-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
121+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
99122
with:
100123
files: ${{ env.APP_NAME }}/krankerl.toml
101124

@@ -117,30 +140,39 @@ jobs:
117140
cd ${{ env.APP_NAME }}
118141
make appstore
119142
120-
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
143+
- name: Check server download link for ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
144+
run: |
145+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
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 }}
121150
continue-on-error: true
122-
id: server-checkout
151+
id: server-download
152+
if: ${{ env.DOWNLOAD_URL != 'null' }}
123153
run: |
124-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
125-
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
126-
unzip latest-$NCVERSION.zip
154+
echo "Downloading release tarball from $DOWNLOAD_URL"
155+
wget $DOWNLOAD_URL -O nextcloud.zip
156+
unzip nextcloud.zip
127157
128158
- name: Checkout server master fallback
129-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
130-
if: ${{ steps.server-checkout.outcome != 'success' }}
159+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
160+
if: ${{ steps.server-download.outcome != 'success' }}
131161
with:
162+
persist-credentials: false
132163
submodules: true
133164
repository: nextcloud/server
134165
path: nextcloud
135166

167+
136168
- name: Sign app
137169
run: |
138170
# Extracting release
139171
cd ${{ env.APP_NAME }}/build/artifacts
140172
tar -xvf ${{ env.APP_NAME }}.tar.gz
141173
cd ../../../
142174
# Setting up keys
143-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
175+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key # zizmor: ignore[secrets-outside-env]
144176
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
145177
# Signing
146178
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 }}
@@ -149,7 +181,7 @@ jobs:
149181
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
150182
151183
- name: Attach tarball to github release
152-
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2
184+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2.11.5
153185
id: attach_to_release
154186
with:
155187
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -159,9 +191,9 @@ jobs:
159191
overwrite: true
160192

161193
- name: Upload app to Nextcloud appstore
162-
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
194+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
163195
with:
164196
app_name: ${{ env.APP_NAME }}
165-
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
197+
appstore_token: ${{ secrets.APPSTORE_TOKEN }} # zizmor: ignore[secrets-outside-env]
166198
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
167-
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
199+
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} # zizmor: ignore[secrets-outside-env]

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

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,13 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php-cs
710

8-
on:
9-
push:
10-
branches: [ main, test ]
11-
paths:
12-
- 'lib/**'
13-
- 'templates/**'
14-
- 'tests/**'
15-
- 'vendor/**'
16-
- 'vendor-bin/**'
17-
- composer.lock
18-
- composer.json
19-
pull_request:
20-
paths:
21-
- 'lib/**'
22-
- 'templates/**'
23-
- 'tests/**'
24-
- 'vendor/**'
25-
- 'vendor-bin/**'
26-
- composer.lock
27-
- composer.json
11+
on: pull_request
2812

2913
permissions:
3014
contents: read
@@ -41,19 +25,27 @@ jobs:
4125

4226
steps:
4327
- name: Checkout
44-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
persist-credentials: false
31+
32+
- name: Get php version
33+
id: versions
34+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
4535

46-
- name: Set up php
47-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
36+
- name: Set up php${{ steps.versions.outputs.php-min }}
37+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
4838
with:
49-
php-version: 8.2
39+
php-version: ${{ steps.versions.outputs.php-min }}
40+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
5041
coverage: none
5142
ini-file: development
5243
env:
5344
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5445

5546
- name: Install dependencies
5647
run: |
48+
composer remove nextcloud/ocp --dev --no-scripts
5749
composer i
5850
5951
- name: Lint

.github/workflows/pr-feedback.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,55 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-FileCopyrightText: 2023 Marcel Klehr <mklehr@gmx.net>
8+
# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com>
9+
# SPDX-FileCopyrightText: 2023 Daniel Kesselberg <mail@danielkesselberg.de>
10+
# SPDX-FileCopyrightText: 2023 Florian Steffens <florian.steffens@nextcloud.com>
11+
# SPDX-License-Identifier: MIT
12+
113
name: 'Ask for feedback on PRs'
214
on:
315
schedule:
416
- cron: '30 1 * * *'
517

18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
622
jobs:
723
pr-feedback:
8-
runs-on: ubuntu-22.04
24+
if: ${{ github.repository_owner == 'nextcloud' }}
25+
runs-on: ubuntu-latest
926
steps:
1027
- name: The get-github-handles-from-website action
11-
uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0
28+
uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1
1229
id: scrape
1330
with:
1431
website: 'https://nextcloud.com/team/'
15-
- uses: marcelklehr/pr-feedback-action@601109aa729eb4c8d6d0ece7567b9d4901db4aef
32+
33+
- name: Get blocklist
34+
id: blocklist
35+
run: |
36+
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
37+
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
38+
39+
- uses: nextcloud/pr-feedback-action@f0cab224dea8e1f282f9451de322f323c78fc7a5 # main
1640
with:
1741
feedback-message: |
1842
Hello there,
19-
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
43+
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
2044
2145
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
2246
2347
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
2448
2549
Thank you for contributing to Nextcloud and we hope to hear from you soon!
50+
51+
(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).)
2652
days-before-feedback: 14
27-
start-date: "2023-07-10"
28-
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command"
53+
start-date: '2025-06-12'
54+
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
2955
exempt-bots: true

0 commit comments

Comments
 (0)