Skip to content

Commit 14f5dd8

Browse files
committed
ci: Update workflows
Signed-off-by: Joas Schilling <[email protected]>
1 parent 936f71c commit 14f5dd8

14 files changed

+116
-48
lines changed

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

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,22 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
37+
persist-credentials: false
3738
path: ${{ env.APP_NAME }}
3839

40+
- name: Get app version number
41+
id: app-version
42+
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
43+
with:
44+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
45+
expression: "//info//version/text()"
46+
47+
- name: Validate app version against tag
48+
run: |
49+
[ "${{ env.APP_VERSION }}" = "v${{ fromJSON(steps.app-version.outputs.result).version }}" ]
50+
3951
- name: Get appinfo data
4052
id: appinfo
4153
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
@@ -56,7 +68,7 @@ jobs:
5668
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5769
# Skip if no package.json
5870
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
71+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
6072
with:
6173
node-version: ${{ steps.versions.outputs.nodeVersion }}
6274

@@ -134,9 +146,10 @@ jobs:
134146
unzip latest-$NCVERSION.zip
135147
136148
- name: Checkout server master fallback
137-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
149+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
138150
if: ${{ steps.server-checkout.outcome != 'success' }}
139151
with:
152+
persist-credentials: false
140153
submodules: true
141154
repository: nextcloud/server
142155
path: nextcloud

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name: Dependabot
1010

1111
on:
12-
pull_request_target:
12+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1313
branches:
1414
- main
1515
- master

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
name: info.xml lint
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2830

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

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,28 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get php version
3133
id: versions
3234
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3335

34-
- name: Set up php${{ steps.versions.outputs.php-available }}
36+
- name: Set up php${{ steps.versions.outputs.php-min }}
3537
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
3638
with:
37-
php-version: ${{ steps.versions.outputs.php-available }}
39+
php-version: ${{ steps.versions.outputs.php-min }}
3840
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3941
coverage: none
4042
ini-file: development
4143
env:
4244
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4345

4446
- name: Install dependencies
45-
run: composer i
47+
run: |
48+
composer remove nextcloud/ocp --dev
49+
composer i
4650
4751
- name: Lint
4852
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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ jobs:
2424
php-versions: ${{ steps.versions.outputs.php-versions }}
2525
steps:
2626
- name: Checkout app
27-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
30+
2831
- name: Get version matrix
2932
id: versions
3033
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
@@ -40,7 +43,9 @@ jobs:
4043

4144
steps:
4245
- name: Checkout
43-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
with:
48+
persist-credentials: false
4449

4550
- name: Set up php ${{ matrix.php-versions }}
4651
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1

.github/workflows/phpunit-mariadb.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get version matrix
3133
id: versions
@@ -88,26 +90,28 @@ jobs:
8890
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
8991
9092
- name: Checkout server
91-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
93+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9294
with:
95+
persist-credentials: false
9396
submodules: true
9497
repository: nextcloud/server
9598
ref: ${{ matrix.server-versions }}
9699

97100
- name: Checkout app
98-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
101+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99102
with:
103+
persist-credentials: false
100104
path: apps/${{ env.APP_NAME }}
101105

102106
- name: Set up php ${{ matrix.php-versions }}
103107
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
104108
with:
105109
php-version: ${{ matrix.php-versions }}
106110
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
107-
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql, sqlite, pdo_sqlite
111+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
108112
coverage: none
109113
ini-file: development
110-
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
114+
# Temporary workaround for missing pcntl_* in PHP 8.3
111115
ini-values: apc.enable_cli=on, disable_functions=
112116
env:
113117
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -127,7 +131,9 @@ jobs:
127131
# Only run if phpunit config file exists
128132
if: steps.check_composer.outputs.files_exists == 'true'
129133
working-directory: apps/${{ env.APP_NAME }}
130-
run: composer i
134+
run: |
135+
composer remove nextcloud/ocp --dev
136+
composer i
131137
132138
- name: Set up Nextcloud
133139
env:

.github/workflows/phpunit-mysql.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
matrix: ${{ steps.versions.outputs.sparse-matrix }}
2525
steps:
2626
- name: Checkout app
27-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2830

2931
- name: Get version matrix
3032
id: versions
@@ -86,26 +88,28 @@ jobs:
8688
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
8789
8890
- name: Checkout server
89-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
91+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9092
with:
93+
persist-credentials: false
9194
submodules: true
9295
repository: nextcloud/server
9396
ref: ${{ matrix.server-versions }}
9497

9598
- name: Checkout app
96-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
99+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97100
with:
101+
persist-credentials: false
98102
path: apps/${{ env.APP_NAME }}
99103

100104
- name: Set up php ${{ matrix.php-versions }}
101105
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
102106
with:
103107
php-version: ${{ matrix.php-versions }}
104108
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
105-
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql, sqlite, pdo_sqlite
109+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
106110
coverage: none
107111
ini-file: development
108-
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
112+
# Temporary workaround for missing pcntl_* in PHP 8.3
109113
ini-values: apc.enable_cli=on, disable_functions=
110114
env:
111115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -125,7 +129,9 @@ jobs:
125129
# Only run if phpunit config file exists
126130
if: steps.check_composer.outputs.files_exists == 'true'
127131
working-directory: apps/${{ env.APP_NAME }}
128-
run: composer i
132+
run: |
133+
composer remove nextcloud/ocp --dev
134+
composer i
129135
130136
- name: Set up Nextcloud
131137
env:

.github/workflows/phpunit-oci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get version matrix
3133
id: versions
@@ -99,26 +101,28 @@ jobs:
99101
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
100102
101103
- name: Checkout server
102-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
104+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
103105
with:
106+
persist-credentials: false
104107
submodules: true
105108
repository: nextcloud/server
106109
ref: ${{ matrix.server-versions }}
107110

108111
- name: Checkout app
109-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
112+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110113
with:
114+
persist-credentials: false
111115
path: apps/${{ env.APP_NAME }}
112116

113117
- name: Set up php ${{ matrix.php-versions }}
114118
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
115119
with:
116120
php-version: ${{ matrix.php-versions }}
117121
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
118-
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8, sqlite, pdo_sqlite
122+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8
119123
coverage: none
120124
ini-file: development
121-
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
125+
# Temporary workaround for missing pcntl_* in PHP 8.3
122126
ini-values: apc.enable_cli=on, disable_functions=
123127
env:
124128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -133,7 +137,9 @@ jobs:
133137
# Only run if phpunit config file exists
134138
if: steps.check_composer.outputs.files_exists == 'true'
135139
working-directory: apps/${{ env.APP_NAME }}
136-
run: composer i
140+
run: |
141+
composer remove nextcloud/ocp --dev
142+
composer i
137143
138144
- name: Set up Nextcloud
139145
env:

.github/workflows/phpunit-pgsql.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get version matrix
3133
id: versions
@@ -89,26 +91,28 @@ jobs:
8991
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9092
9193
- name: Checkout server
92-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
94+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9395
with:
96+
persist-credentials: false
9497
submodules: true
9598
repository: nextcloud/server
9699
ref: ${{ matrix.server-versions }}
97100

98101
- name: Checkout app
99-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
102+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
100103
with:
104+
persist-credentials: false
101105
path: apps/${{ env.APP_NAME }}
102106

103107
- name: Set up php ${{ matrix.php-versions }}
104108
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
105109
with:
106110
php-version: ${{ matrix.php-versions }}
107111
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
108-
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql, sqlite, pdo_sqlite
112+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
109113
coverage: none
110114
ini-file: development
111-
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
115+
# Temporary workaround for missing pcntl_* in PHP 8.3
112116
ini-values: apc.enable_cli=on, disable_functions=
113117
env:
114118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -123,7 +127,9 @@ jobs:
123127
# Only run if phpunit config file exists
124128
if: steps.check_composer.outputs.files_exists == 'true'
125129
working-directory: apps/${{ env.APP_NAME }}
126-
run: composer i
130+
run: |
131+
composer remove nextcloud/ocp --dev
132+
composer i
127133
128134
- name: Set up Nextcloud
129135
env:

.github/workflows/phpunit-sqlite.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get version matrix
3133
id: versions
@@ -78,15 +80,17 @@ jobs:
7880
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
7981
8082
- name: Checkout server
81-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
83+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8284
with:
85+
persist-credentials: false
8386
submodules: true
8487
repository: nextcloud/server
8588
ref: ${{ matrix.server-versions }}
8689

8790
- name: Checkout app
88-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
91+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8992
with:
93+
persist-credentials: false
9094
path: apps/${{ env.APP_NAME }}
9195

9296
- name: Set up php ${{ matrix.php-versions }}
@@ -97,7 +101,7 @@ jobs:
97101
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
98102
coverage: none
99103
ini-file: development
100-
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
104+
# Temporary workaround for missing pcntl_* in PHP 8.3
101105
ini-values: apc.enable_cli=on, disable_functions=
102106
env:
103107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -112,7 +116,9 @@ jobs:
112116
# Only run if phpunit config file exists
113117
if: steps.check_composer.outputs.files_exists == 'true'
114118
working-directory: apps/${{ env.APP_NAME }}
115-
run: composer i
119+
run: |
120+
composer remove nextcloud/ocp --dev
121+
composer i
116122
117123
- name: Set up Nextcloud
118124
env:

0 commit comments

Comments
 (0)