Skip to content

Commit 7752929

Browse files
committed
chore: update workflows
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent 401562f commit 7752929

16 files changed

Lines changed: 111 additions & 23 deletions

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

Lines changed: 17 additions & 1 deletion
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
@@ -34,11 +37,23 @@ jobs:
3437
- name: Checkout
3538
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@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+
3954
- name: Get appinfo data
4055
id: appinfo
41-
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
56+
uses: skjnldsv/xpath-action@f5b036e9d973f42c86324833fd00be90665fbf77 # master
4257
with:
4358
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4459
expression: "//info//dependencies//nextcloud/@min-version"
@@ -137,6 +152,7 @@ jobs:
137152
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/dependabot-approve-merge.yml

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ jobs:
5757
steps:
5858
- name: Checkout
5959
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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Install dependencies
4747
run: |
48-
composer remove nextcloud/ocp --dev
48+
composer remove nextcloud/ocp --dev --no-scripts
4949
composer i
5050
5151
- name: Lint

.github/workflows/lint-php.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
steps:
2626
- name: Checkout app
2727
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
@@ -41,6 +44,8 @@ jobs:
4144
steps:
4245
- name: Checkout
4346
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@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1

.github/workflows/node-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
steps:
6262
- name: Checkout
6363
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64+
with:
65+
persist-credentials: false
6466

6567
- name: Read package.json node and npm engines version
6668
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3

.github/workflows/openapi.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
steps:
2828
- name: Checkout
2929
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
with:
31+
persist-credentials: false
3032

3133
- name: Get php version
3234
id: php_versions
@@ -68,7 +70,7 @@ jobs:
6870
if: ${{ steps.node_versions.outputs.nodeVersion }}
6971
run: npm i -g 'npm@${{ steps.node_versions.outputs.npmVersion }}'
7072

71-
- name: Install dependencies & build
73+
- name: Install dependencies
7274
if: ${{ steps.node_versions.outputs.nodeVersion }}
7375
env:
7476
CYPRESS_INSTALL_BINARY: 0

.github/workflows/phpunit-mariadb.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
steps:
2727
- name: Checkout app
2828
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
persist-credentials: false
2931

3032
- name: Get version matrix
3133
id: versions
@@ -68,35 +70,38 @@ 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

7577
services:
7678
mariadb:
77-
image: ghcr.io/nextcloud/continuous-integration-mariadb-${{ matrix.mariadb-versions }}:latest
79+
image: ghcr.io/nextcloud/continuous-integration-mariadb-${{ matrix.mariadb-versions }}:latest # zizmor: ignore[unpinned-images]
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
9194
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
98102
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99103
with:
104+
persist-credentials: false
100105
path: apps/${{ env.APP_NAME }}
101106

102107
- name: Checkout teams dependency
@@ -114,6 +119,8 @@ jobs:
114119
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
115120
coverage: none
116121
ini-file: development
122+
# Temporary workaround for missing pcntl_* in PHP 8.3
123+
ini-values: disable_functions=
117124
env:
118125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119126

@@ -132,7 +139,9 @@ jobs:
132139
# Only run if phpunit config file exists
133140
if: steps.check_composer.outputs.files_exists == 'true'
134141
working-directory: apps/${{ env.APP_NAME }}
135-
run: composer i
142+
run: |
143+
composer remove nextcloud/ocp --dev --no-scripts
144+
composer i
136145
137146
- name: Set up Nextcloud
138147
env:

.github/workflows/phpunit-mysql.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Checkout app
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
with:
29+
persist-credentials: false
2830

2931
- name: Get version matrix
3032
id: versions
@@ -72,7 +74,7 @@ jobs:
7274

7375
services:
7476
mysql:
75-
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
77+
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest # zizmor: ignore[unpinned-images]
7678
ports:
7779
- 4444:3306/tcp
7880
env:
@@ -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
8992
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
96100
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97101
with:
102+
persist-credentials: false
98103
path: apps/${{ env.APP_NAME }}
99104

100105
- name: Checkout teams dependency
@@ -112,6 +117,8 @@ jobs:
112117
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
113118
coverage: none
114119
ini-file: development
120+
# Temporary workaround for missing pcntl_* in PHP 8.3
121+
ini-values: disable_functions=
115122
env:
116123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117124

@@ -130,7 +137,9 @@ jobs:
130137
# Only run if phpunit config file exists
131138
if: steps.check_composer.outputs.files_exists == 'true'
132139
working-directory: apps/${{ env.APP_NAME }}
133-
run: composer i
140+
run: |
141+
composer remove nextcloud/ocp --dev --no-scripts
142+
composer i
134143
135144
- name: Set up Nextcloud
136145
env:

0 commit comments

Comments
 (0)