Skip to content

Commit 759b5ae

Browse files
committed
Merge branch 'main' into feat/Dockerfile/switch-cmd-to-entrypoint
# Conflicts: # Dockerfile
2 parents 167276c + 05ccc6b commit 759b5ae

File tree

101 files changed

+10489
-6259
lines changed

Some content is hidden

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

101 files changed

+10489
-6259
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
13
target
24
lib
35
test_client

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# App maintainers
2+
/appinfo/ @icewind1991 @max-nextcloud
3+
/img/ @icewind1991 @max-nextcloud
4+
/src/ @icewind1991 @max-nextcloud
5+
/test_client/ @icewind1991 @max-nextcloud
6+
/tests/ @icewind1991 @max-nextcloud
7+
/vendor-bin/**/*.json @icewind1991 @max-nextcloud
8+
Dockerfile @icewind1991 @max-nextcloud
9+
*.json @icewind1991 @max-nextcloud
10+
*.md @icewind1991 @max-nextcloud
11+
*.rs @icewind1991 @max-nextcloud
12+
*.toml @icewind1991 @max-nextcloud
13+
*.xml @icewind1991 @max-nextcloud

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
13
version: 2
24
updates:
35
- package-ecosystem: cargo

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

Lines changed: 54 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
# This workflow is adjusted compared to the one from the template to setup rust+cross
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: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
28

39
name: Build and publish app release
410

511
on:
612
release:
713
types: [published]
814

9-
env:
10-
PHP_VERSION: 8.1
15+
permissions:
16+
contents: write
1117

1218
jobs:
1319
build_and_publish:
@@ -17,25 +23,14 @@ jobs:
1723
if: ${{ github.repository_owner == 'nextcloud-releases' }}
1824

1925
steps:
20-
### Adjustments start ###
21-
- name: musl-tools
22-
run: |
23-
sudo apt-get install musl-tools
24-
- name: Checkout code
25-
uses: actions/checkout@v3
26-
- uses: actions-rs/toolchain@v1
26+
- uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.5.2
27+
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
2728
with:
28-
profile: minimal
29-
toolchain: stable
30-
override: true
31-
target: x86_64-unknown-linux-musl
32-
- name: cross
33-
run: |
34-
cargo install cross --locked
35-
### Adjustments end ###
29+
name: notify-push
30+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
3631

3732
- name: Check actor permission
38-
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
33+
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
3934
with:
4035
require: write
4136

@@ -46,50 +41,69 @@ jobs:
4641
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
4742
4843
- name: Checkout
49-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
44+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5045
with:
46+
persist-credentials: false
5147
path: ${{ env.APP_NAME }}
48+
fetch-depth: 0
49+
50+
- name: Get app version number
51+
id: app-version
52+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
53+
with:
54+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
55+
expression: "//info//version/text()"
56+
57+
- name: Validate app version against tag
58+
run: |
59+
[ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
5260
5361
- name: Get appinfo data
5462
id: appinfo
55-
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
63+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # v1.0.0
5664
with:
5765
filename: ${{ env.APP_NAME }}/appinfo/info.xml
5866
expression: "//info//dependencies//nextcloud/@min-version"
5967

6068
- name: Read package.json node and npm engines version
61-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
69+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
6270
id: versions
6371
# Continue if no package.json
6472
continue-on-error: true
6573
with:
6674
path: ${{ env.APP_NAME }}
67-
fallbackNode: "^16"
68-
fallbackNpm: "^7"
75+
fallbackNode: '^20'
76+
fallbackNpm: '^10'
6977

7078
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
7179
# Skip if no package.json
7280
if: ${{ steps.versions.outputs.nodeVersion }}
73-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
81+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
7482
with:
7583
node-version: ${{ steps.versions.outputs.nodeVersion }}
7684

7785
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
7886
# Skip if no package.json
7987
if: ${{ steps.versions.outputs.npmVersion }}
80-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
88+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
8189

82-
- name: Set up php ${{ env.PHP_VERSION }}
83-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
90+
- name: Get php version
91+
id: php-versions
92+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
8493
with:
85-
php-version: ${{ env.PHP_VERSION }}
94+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
95+
96+
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
97+
uses: shivammathur/setup-php@ccf2c627fe61b1b4d924adfcbd19d661a18133a0 # v2.35.2
98+
with:
99+
php-version: ${{ steps.php-versions.outputs.php-min }}
86100
coverage: none
87101
env:
88102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89103

90104
- name: Check composer.json
91105
id: check_composer
92-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
106+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
93107
with:
94108
files: "${{ env.APP_NAME }}/composer.json"
95109

@@ -102,14 +116,16 @@ jobs:
102116
- name: Build ${{ env.APP_NAME }}
103117
# Skip if no package.json
104118
if: ${{ steps.versions.outputs.nodeVersion }}
119+
env:
120+
CYPRESS_INSTALL_BINARY: 0
105121
run: |
106122
cd ${{ env.APP_NAME }}
107123
npm ci
108-
npm run build
124+
npm run build --if-present
109125
110126
- name: Check Krankerl config
111127
id: krankerl
112-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
128+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
113129
with:
114130
files: ${{ env.APP_NAME }}/krankerl.toml
115131

@@ -135,14 +151,15 @@ jobs:
135151
continue-on-error: true
136152
id: server-checkout
137153
run: |
138-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
154+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
139155
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
140156
unzip latest-$NCVERSION.zip
141157
142158
- name: Checkout server master fallback
143-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
159+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
144160
if: ${{ steps.server-checkout.outcome != 'success' }}
145161
with:
162+
persist-credentials: false
146163
submodules: true
147164
repository: nextcloud/server
148165
path: nextcloud
@@ -154,7 +171,7 @@ jobs:
154171
tar -xvf ${{ env.APP_NAME }}.tar.gz
155172
cd ../../../
156173
# Setting up keys
157-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
174+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
158175
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
159176
# Signing
160177
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 }}
@@ -163,7 +180,7 @@ jobs:
163180
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
164181
165182
- name: Attach tarball to github release
166-
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2
183+
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
167184
id: attach_to_release
168185
with:
169186
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -173,7 +190,7 @@ jobs:
173190
overwrite: true
174191

175192
- name: Upload app to Nextcloud appstore
176-
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
193+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
177194
with:
178195
app_name: ${{ env.APP_NAME }}
179196
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml
2+
index 316ba14..3cb9983 100644
3+
--- a/.github/workflows/appstore-build-publish.yml
4+
+++ b/.github/workflows/appstore-build-publish.yml
5+
@@ -23,6 +23,12 @@ jobs:
6+
if: ${{ github.repository_owner == 'nextcloud-releases' }}
7+
8+
steps:
9+
+ - uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.5.2
10+
+ - uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
11+
+ with:
12+
+ name: notify-push
13+
+ authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
14+
+
15+
- name: Check actor permission
16+
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
17+
with:
18+
@@ -39,6 +45,7 @@ jobs:
19+
with:
20+
persist-credentials: false
21+
path: ${{ env.APP_NAME }}
22+
+ fetch-depth: 0
23+
24+
- name: Get app version number
25+
id: app-version
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
2+
SPDX-License-Identifier: MIT

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +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 info.xml
710

8-
on:
9-
pull_request:
10-
push:
11-
branches:
12-
- main
13-
- master
14-
- stable*
11+
on: pull_request
1512

1613
permissions:
1714
contents: read
@@ -22,18 +19,20 @@ concurrency:
2219

2320
jobs:
2421
xml-linters:
25-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-latest-low
2623

2724
name: info.xml lint
2825
steps:
2926
- name: Checkout
30-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
with:
29+
persist-credentials: false
3130

3231
- name: Download schema
3332
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
3433

3534
- name: Lint info.xml
36-
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
35+
uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2
3736
with:
3837
xml-file: ./appinfo/info.xml
3938
xml-schema-file: ./info.xsd

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

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
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

@@ -22,19 +25,28 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
persist-credentials: false
31+
32+
- name: Get php version
33+
id: versions
34+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
2635

27-
- name: Set up php
28-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
36+
- name: Set up php${{ steps.versions.outputs.php-min }}
37+
uses: shivammathur/setup-php@ccf2c627fe61b1b4d924adfcbd19d661a18133a0 # v2.35.2
2938
with:
30-
php-version: 8.1
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
3141
coverage: none
3242
ini-file: development
3343
env:
3444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3545

3646
- name: Install dependencies
37-
run: composer i
47+
run: |
48+
composer remove nextcloud/ocp --dev --no-scripts
49+
composer i
3850
3951
- name: Lint
4052
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

0 commit comments

Comments
 (0)