Skip to content

Commit c6f7c22

Browse files
authored
Merge branch 'main' into prevent-invalid-year-input
2 parents b6dac89 + d9acce9 commit c6f7c22

103 files changed

Lines changed: 1798 additions & 794 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ updates:
99
time: "03:00"
1010
timezone: Europe/Paris
1111
open-pull-requests-limit: 10
12+
labels:
13+
- 3. to review
14+
- dependencies
1215
reviewers:
1316
- juliushaertl
1417
- luka-nextcloud
1518

1619
- package-ecosystem: npm
17-
target-branch: stable32
20+
target-branch: stable33
1821
versioning-strategy: lockfile-only
1922
directory: "/"
2023
schedule:
@@ -29,9 +32,12 @@ updates:
2932
labels:
3033
- 3. to review
3134
- dependencies
35+
reviewers:
36+
- juliushaertl
37+
- luka-nextcloud
3238

3339
- package-ecosystem: npm
34-
target-branch: stable31
40+
target-branch: stable32
3541
versioning-strategy: lockfile-only
3642
directory: "/"
3743
schedule:
@@ -46,15 +52,18 @@ updates:
4652
labels:
4753
- 3. to review
4854
- dependencies
55+
reviewers:
56+
- juliushaertl
57+
- luka-nextcloud
4958

5059
- package-ecosystem: npm
51-
target-branch: stable30
60+
target-branch: stable31
5261
versioning-strategy: lockfile-only
5362
directory: "/"
5463
schedule:
5564
interval: weekly
5665
day: saturday
57-
time: "03:30"
66+
time: "03:15"
5867
timezone: Europe/Paris
5968
ignore:
6069
- dependency-name: "*"
@@ -63,6 +72,9 @@ updates:
6372
labels:
6473
- 3. to review
6574
- dependencies
75+
reviewers:
76+
- juliushaertl
77+
- luka-nextcloud
6678

6779
- package-ecosystem: composer
6880
directory: "/"

.github/workflows/appbuild.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

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

Lines changed: 24 additions & 16 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@395ad3262231945c25e8478fd5baf05154b1d79f # v4.1.0
74+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.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@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
90+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
9191
with:
9292
php-version: ${{ steps.php-versions.outputs.php-min }}
9393
coverage: none
@@ -140,23 +140,31 @@ 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
@@ -173,7 +181,7 @@ jobs:
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@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2
184+
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2.11.3
177185
id: attach_to_release
178186
with:
179187
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -183,7 +191,7 @@ jobs:
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/cypress-e2e.yml

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- main
88
- stable*
99

10+
permissions:
11+
contents: read
12+
1013
env:
1114
APP_NAME: deck
1215
CYPRESS_baseUrl: http://localhost:8081/index.php
@@ -26,13 +29,9 @@ jobs:
2629

2730
name: runner ${{ matrix.containers }}
2831

29-
env:
30-
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu
31-
key: cache-v1
32-
3332
services:
3433
postgres:
35-
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
34+
image: ghcr.io/nextcloud/continuous-integration-postgres-17:latest # zizmor: ignore[unpinned-images]
3635
ports:
3736
- 4444:5432/tcp
3837
env:
@@ -43,7 +42,7 @@ jobs:
4342

4443
steps:
4544
- name: Use Node.js ${{ matrix.node-version }}
46-
uses: actions/setup-node@v6.1.0
45+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4746
with:
4847
node-version: ${{ matrix.node-version }}
4948

@@ -53,53 +52,39 @@ jobs:
5352
echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV
5453
5554
- name: Checkout server
56-
uses: actions/checkout@v4.2.2
55+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5756
with:
57+
persist-credentials: false
5858
repository: nextcloud/server
59+
submodules: true
5960
ref: ${{ matrix.server-versions }}
6061

61-
- name: Checkout submodules
62-
shell: bash
63-
run: |
64-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
65-
git submodule sync --recursive
66-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
67-
6862
- name: Checkout ${{ env.APP_NAME }}
69-
uses: actions/checkout@v4.2.2
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7064
with:
65+
persist-credentials: false
7166
path: apps/${{ env.APP_NAME }}
7267

7368
- name: Checkout text
74-
uses: actions/checkout@v4.2.2
69+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7570
with:
71+
persist-credentials: false
7672
repository: nextcloud/text
7773
ref: ${{ env.text_app_ref }}
7874
path: apps/text
7975

80-
- name: Setup cache environment
81-
id: extcache
82-
uses: shivammathur/cache-extensions@v1
83-
with:
84-
php-version: ${{ matrix.php-versions }}
85-
extensions: ${{ env.extensions }}
86-
key: ${{ env.key }}
87-
88-
- name: Cache extensions
89-
uses: actions/cache@v4
90-
with:
91-
path: ${{ steps.extcache.outputs.dir }}
92-
key: ${{ steps.extcache.outputs.key }}
93-
restore-keys: ${{ steps.extcache.outputs.key }}
94-
9576
- name: Set up php ${{ matrix.php-versions }}
96-
uses: shivammathur/setup-php@2.34.1
77+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
9778
with:
98-
php-version: ${{ matrix.php-versions }}
99-
extensions: ${{ env.extensions }}
100-
ini-values:
101-
apc.enable_cli=on
102-
coverage: none
79+
php-version: ${{ matrix.php-versions }}
80+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
81+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
82+
coverage: none
83+
ini-file: development
84+
# Temporary workaround for missing pcntl_* in PHP
85+
ini-values: apc.enable_cli=on, disable_functions=
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10388

10489
- name: Install composer dependencies
10590
working-directory: apps/${{ env.APP_NAME }}
@@ -125,7 +110,7 @@ jobs:
125110
curl -v http://localhost:8081/index.php/login
126111
127112
- name: Cypress run
128-
uses: cypress-io/github-action@v6
113+
uses: cypress-io/github-action@0f330ebf0d60f87608ed72f1d6232e5644aa3171 # v7.1.1
129114
with:
130115
build: npm run dev
131116
record: false
@@ -141,15 +126,15 @@ jobs:
141126
SPLIT_INDEX: ${{ strategy.job-index }}
142127

143128
- name: Upload test failure screenshots
144-
uses: actions/upload-artifact@v5
129+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
145130
if: failure()
146131
with:
147132
name: Upload screenshots
148133
path: apps/${{ env.APP_NAME }}/cypress/screenshots/
149134
retention-days: 5
150135

151136
- name: Upload nextcloud logs
152-
uses: actions/upload-artifact@v5
137+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
153138
if: failure()
154139
with:
155140
name: Upload nextcloud log

.github/workflows/dependabot-approve-merge.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
6-
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
6+
# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
77
# SPDX-License-Identifier: MIT
88

9-
name: Dependabot
9+
name: Auto approve Dependabot PRs
1010

1111
on:
1212
pull_request_target: # zizmor: ignore[dangerous-triggers]
@@ -29,6 +29,8 @@ jobs:
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs
3131
pull-requests: write
32+
# for alexwilson/enable-github-automerge-action to approve PRs
33+
contents: write
3234

3335
steps:
3436
- name: Disabled on forks
@@ -37,13 +39,20 @@ jobs:
3739
echo 'Can not approve PRs from forks'
3840
exit 1
3941
42+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+
id: branchname
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
4047
# GitHub actions bot approve
41-
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
48+
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4250
with:
4351
github-token: ${{ secrets.GITHUB_TOKEN }}
4452

45-
# Nextcloud bot approve and merge request
46-
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2
53+
# Enable GitHub auto merge
54+
- name: Auto merge
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4757
with:
48-
target: minor
49-
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
58+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)