Skip to content

Commit 5e83238

Browse files
committed
ci: Update actions
Signed-off-by: Joas Schilling <[email protected]>
1 parent d02eeb5 commit 5e83238

20 files changed

+147
-51
lines changed

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

+19-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
release:
1313
types: [published]
1414

15+
permissions:
16+
contents: write
17+
1518
jobs:
1619
build_and_publish:
1720
runs-on: ubuntu-latest
@@ -32,10 +35,22 @@ jobs:
3235
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3336
3437
- name: Checkout
35-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
38+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.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@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # 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+
3954
- name: Get appinfo data
4055
id: appinfo
4156
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
@@ -56,7 +71,7 @@ jobs:
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@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
74+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
6075
with:
6176
node-version: ${{ steps.versions.outputs.nodeVersion }}
6277

@@ -134,9 +149,10 @@ jobs:
134149
unzip latest-$NCVERSION.zip
135150
136151
- name: Checkout server master fallback
137-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
152+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
138153
if: ${{ steps.server-checkout.outcome != 'success' }}
139154
with:
155+
persist-credentials: false
140156
submodules: true
141157
repository: nextcloud/server
142158
path: nextcloud

.github/workflows/block-unconventional-commits.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
persist-credentials: false
3133

3234
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
3335
with:

.github/workflows/command-openapi.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
issue_comment:
1212
types: [created]
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
init:
1619
runs-on: ubuntu-latest
@@ -100,8 +103,9 @@ jobs:
100103
key: git-repo
101104

102105
- name: Checkout ${{ needs.init.outputs.head_ref }}
103-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
106+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104107
with:
108+
persist-credentials: false
105109
token: ${{ secrets.COMMAND_BOT_PAT }}
106110
fetch-depth: 0
107111
ref: ${{ needs.init.outputs.head_ref }}

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

+2-2
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
@@ -24,7 +24,7 @@ concurrency:
2424

2525
jobs:
2626
auto-approve-merge:
27-
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
27+
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
2828
runs-on: ubuntu-latest-low
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs

.github/workflows/lint-eslint.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60+
with:
61+
persist-credentials: false
6062

6163
- name: Read package.json node and npm engines version
6264
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -66,7 +68,7 @@ jobs:
6668
fallbackNpm: '^10'
6769

6870
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
69-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
71+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
7072
with:
7173
node-version: ${{ steps.versions.outputs.nodeVersion }}
7274

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

+3-1
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

+9-5
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
48-
run: PHP_CS_FIXER_IGNORE_ENV=1 composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
52+
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

.github/workflows/lint-php.yml

+7-2
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/lint-stylelint.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ 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: Read package.json node and npm engines version
3133
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -35,7 +37,7 @@ jobs:
3537
fallbackNpm: '^10'
3638

3739
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
38-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
40+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
3941
with:
4042
node-version: ${{ steps.versions.outputs.nodeVersion }}
4143

.github/workflows/node.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ jobs:
5353
name: NPM build
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
56+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
57+
with:
58+
persist-credentials: false
5759

5860
- name: Read package.json node and npm engines version
5961
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
@@ -63,7 +65,7 @@ jobs:
6365
fallbackNpm: '^10'
6466

6567
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
66-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
68+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
6769
with:
6870
node-version: ${{ steps.versions.outputs.nodeVersion }}
6971

.github/workflows/openapi.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626

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

3133
- name: Get php version
3234
id: php_versions
@@ -60,7 +62,7 @@ jobs:
6062

6163
- name: Set up node ${{ steps.node_versions.outputs.nodeVersion }}
6264
if: ${{ steps.node_versions.outputs.nodeVersion }}
63-
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
65+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
6466
with:
6567
node-version: ${{ steps.node_versions.outputs.nodeVersion }}
6668

.github/workflows/phpunit-mariadb.yml

+16-7
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
@@ -68,7 +70,7 @@ jobs:
6870
matrix:
6971
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7072
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
71-
mariadb-versions: ['10.6', '10.11']
73+
mariadb-versions: ['10.6', '11.4']
7274

7375
name: MariaDB ${{ matrix.mariadb-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
7476

@@ -78,25 +80,28 @@ jobs:
7880
ports:
7981
- 4444:3306/tcp
8082
env:
81-
MYSQL_ROOT_PASSWORD: rootpassword
82-
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
83+
MARIADB_ROOT_PASSWORD: rootpassword
84+
options: --health-cmd="mariadb-admin ping" --health-interval 5s --health-timeout 2s --health-retries 5
8385

8486
steps:
8587
- name: Set app env
88+
if: ${{ env.APP_NAME == '' }}
8689
run: |
8790
# Split and keep last
8891
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
8992
9093
- name: Checkout server
91-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
94+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9295
with:
96+
persist-credentials: false
9397
submodules: true
9498
repository: nextcloud/server
9599
ref: ${{ matrix.server-versions }}
96100

97101
- name: Checkout app
98-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
102+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99103
with:
104+
persist-credentials: false
100105
path: apps/${{ env.APP_NAME }}
101106

102107
- name: Set up php ${{ matrix.php-versions }}
@@ -107,6 +112,8 @@ jobs:
107112
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
108113
coverage: none
109114
ini-file: development
115+
# Temporary workaround for missing pcntl_* in PHP 8.3
116+
ini-values: disable_functions=
110117
env:
111118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112119

@@ -125,7 +132,9 @@ jobs:
125132
# Only run if phpunit config file exists
126133
if: steps.check_composer.outputs.files_exists == 'true'
127134
working-directory: apps/${{ env.APP_NAME }}
128-
run: composer i
135+
run: |
136+
composer remove nextcloud/ocp --dev
137+
composer i
129138
130139
- name: Set up Nextcloud
131140
env:

.github/workflows/phpunit-mysql.yml

+13-4
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
@@ -81,20 +83,23 @@ jobs:
8183

8284
steps:
8385
- name: Set app env
86+
if: ${{ env.APP_NAME == '' }}
8487
run: |
8588
# Split and keep last
8689
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
8790
8891
- name: Checkout server
89-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
92+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9093
with:
94+
persist-credentials: false
9195
submodules: true
9296
repository: nextcloud/server
9397
ref: ${{ matrix.server-versions }}
9498

9599
- name: Checkout app
96-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
100+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97101
with:
102+
persist-credentials: false
98103
path: apps/${{ env.APP_NAME }}
99104

100105
- name: Set up php ${{ matrix.php-versions }}
@@ -105,6 +110,8 @@ jobs:
105110
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
106111
coverage: none
107112
ini-file: development
113+
# Temporary workaround for missing pcntl_* in PHP 8.3
114+
ini-values: disable_functions=
108115
env:
109116
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110117

@@ -123,7 +130,9 @@ jobs:
123130
# Only run if phpunit config file exists
124131
if: steps.check_composer.outputs.files_exists == 'true'
125132
working-directory: apps/${{ env.APP_NAME }}
126-
run: composer i
133+
run: |
134+
composer remove nextcloud/ocp --dev
135+
composer i
127136
128137
- name: Set up Nextcloud
129138
env:

0 commit comments

Comments
 (0)