Skip to content

Commit a0d793e

Browse files
Merge pull request #693 from nextcloud/automated/noid/stable29-update-nextcloud-ocp
[stable29] Update nextcloud/ocp dependency
2 parents 95b6867 + 49d430e commit a0d793e

15 files changed

+260
-97
lines changed

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

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
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

15+
permissions:
16+
contents: write
17+
1218
jobs:
1319
build_and_publish:
1420
runs-on: ubuntu-latest
@@ -29,19 +35,31 @@ jobs:
2935
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3036
3137
- name: Checkout
32-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3339
with:
40+
persist-credentials: false
3441
path: ${{ env.APP_NAME }}
3542

43+
- name: Get app version number
44+
id: app-version
45+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
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+
3654
- name: Get appinfo data
3755
id: appinfo
38-
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
3957
with:
4058
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4159
expression: "//info//dependencies//nextcloud/@min-version"
4260

4361
- name: Read package.json node and npm engines version
44-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
62+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4563
id: versions
4664
# Continue if no package.json
4765
continue-on-error: true
@@ -53,14 +71,14 @@ jobs:
5371
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5472
# Skip if no package.json
5573
if: ${{ steps.versions.outputs.nodeVersion }}
56-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
74+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
5775
with:
5876
node-version: ${{ steps.versions.outputs.nodeVersion }}
5977

6078
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
6179
# Skip if no package.json
6280
if: ${{ steps.versions.outputs.npmVersion }}
63-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
81+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
6482

6583
- name: Get php version
6684
id: php-versions
@@ -69,7 +87,7 @@ jobs:
6987
filename: ${{ env.APP_NAME }}/appinfo/info.xml
7088

7189
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
72-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
90+
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
7391
with:
7492
php-version: ${{ steps.php-versions.outputs.php-min }}
7593
coverage: none
@@ -78,7 +96,7 @@ jobs:
7896

7997
- name: Check composer.json
8098
id: check_composer
81-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
99+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
82100
with:
83101
files: "${{ env.APP_NAME }}/composer.json"
84102

@@ -96,11 +114,11 @@ jobs:
96114
run: |
97115
cd ${{ env.APP_NAME }}
98116
npm ci
99-
npm run build
117+
npm run build --if-present
100118
101119
- name: Check Krankerl config
102120
id: krankerl
103-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
121+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
104122
with:
105123
files: ${{ env.APP_NAME }}/krankerl.toml
106124

@@ -126,14 +144,15 @@ jobs:
126144
continue-on-error: true
127145
id: server-checkout
128146
run: |
129-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
147+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
130148
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
131149
unzip latest-$NCVERSION.zip
132150
133151
- name: Checkout server master fallback
134-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
152+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
135153
if: ${{ steps.server-checkout.outcome != 'success' }}
136154
with:
155+
persist-credentials: false
137156
submodules: true
138157
repository: nextcloud/server
139158
path: nextcloud
@@ -145,7 +164,7 @@ jobs:
145164
tar -xvf ${{ env.APP_NAME }}.tar.gz
146165
cd ../../../
147166
# Setting up keys
148-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
167+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
149168
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
150169
# Signing
151170
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 }}

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
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: Dependabot
710

811
on:
9-
pull_request_target:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1013
branches:
1114
- main
1215
- master
@@ -21,14 +24,20 @@ concurrency:
2124

2225
jobs:
2326
auto-approve-merge:
24-
if: github.actor == 'dependabot[bot]'
27+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
2528
runs-on: ubuntu-latest-low
2629
permissions:
2730
# for hmarr/auto-approve-action to approve PRs
2831
pull-requests: write
2932

3033
steps:
31-
# Github actions bot approve
34+
- name: Disabled on forks
35+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
36+
run: |
37+
echo 'Can not approve PRs from forks'
38+
exit 1
39+
40+
# GitHub actions bot approve
3241
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
3342
with:
3443
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/fixup.yml

Lines changed: 4 additions & 1 deletion
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: Block fixup and squash commits
710

@@ -28,6 +31,6 @@ jobs:
2831

2932
steps:
3033
- name: Run check
31-
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1
34+
uses: skjnldsv/block-fixup-merge-action@c138ea99e45e186567b64cf065ce90f7158c236a # v2
3235
with:
3336
repo-token: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 6 additions & 1 deletion
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 info.xml
710

@@ -21,7 +24,9 @@ jobs:
2124
name: info.xml lint
2225
steps:
2326
- name: Checkout
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2530

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

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

Lines changed: 12 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,24 +25,28 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2631

2732
- name: Get php version
2833
id: versions
2934
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3035

31-
- name: Set up php${{ steps.versions.outputs.php-available }}
32-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
36+
- name: Set up php${{ steps.versions.outputs.php-min }}
37+
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
3338
with:
34-
php-version: ${{ steps.versions.outputs.php-available }}
39+
php-version: ${{ steps.versions.outputs.php-min }}
3540
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3641
coverage: none
3742
ini-file: development
3843
env:
3944
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4045

4146
- name: Install dependencies
42-
run: composer i
47+
run: |
48+
composer remove nextcloud/ocp --dev
49+
composer i
4350
4451
- name: Lint
4552
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

.github/workflows/lint-php.yml

Lines changed: 11 additions & 3 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
710

@@ -21,7 +24,10 @@ jobs:
2124
php-versions: ${{ steps.versions.outputs.php-versions }}
2225
steps:
2326
- name: Checkout app
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
30+
2531
- name: Get version matrix
2632
id: versions
2733
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
@@ -37,10 +43,12 @@ jobs:
3743

3844
steps:
3945
- name: Checkout
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
with:
48+
persist-credentials: false
4149

4250
- name: Set up php ${{ matrix.php-versions }}
43-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
51+
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
4452
with:
4553
php-version: ${{ matrix.php-versions }}
4654
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

0 commit comments

Comments
 (0)