Skip to content

Commit 9335cdb

Browse files
Merge pull request #840 from nextcloud/backport/838/stable32
[stable32] ci(actions): Update workflows
2 parents 6c289af + 3c6bb29 commit 9335cdb

13 files changed

Lines changed: 87 additions & 68 deletions

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

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3636
3737
- name: Checkout
38-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3939
with:
4040
persist-credentials: false
4141
path: ${{ env.APP_NAME }}
@@ -65,13 +65,13 @@ jobs:
6565
continue-on-error: true
6666
with:
6767
path: ${{ env.APP_NAME }}
68-
fallbackNode: '^20'
69-
fallbackNpm: '^10'
68+
fallbackNode: '^24'
69+
fallbackNpm: '^11.3'
7070

7171
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
7272
# Skip if no package.json
7373
if: ${{ steps.versions.outputs.nodeVersion }}
74-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
74+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
7575
with:
7676
node-version: ${{ steps.versions.outputs.nodeVersion }}
7777

@@ -87,7 +87,7 @@ jobs:
8787
filename: ${{ env.APP_NAME }}/appinfo/info.xml
8888

8989
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
90-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
90+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
9191
with:
9292
php-version: ${{ steps.php-versions.outputs.php-min }}
9393
coverage: none
@@ -140,23 +140,31 @@ jobs:
140140
cd ${{ env.APP_NAME }}
141141
make appstore
142142
143-
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
144-
continue-on-error: true
145-
id: server-checkout
143+
- name: Check server download link for ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
146144
run: |
147145
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
148-
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
149-
unzip latest-$NCVERSION.zip
146+
DOWNLOAD_URL=$(curl -s "https://updates.nextcloud.com/updater_server/latest?channel=beta&version=$NCVERSION" | jq -r '.downloads.zip[0]')
147+
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
148+
149+
- name: Download server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
150+
continue-on-error: true
151+
id: server-download
152+
if: ${{ env.DOWNLOAD_URL != 'null' }}
153+
run: |
154+
echo "Downloading release tarball from $DOWNLOAD_URL"
155+
wget $DOWNLOAD_URL -O nextcloud.zip
156+
unzip nextcloud.zip
150157
151158
- name: Checkout server master fallback
152-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
153-
if: ${{ steps.server-checkout.outcome != 'success' }}
159+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
160+
if: ${{ steps.server-download.outcome != 'success' }}
154161
with:
155162
persist-credentials: false
156163
submodules: true
157164
repository: nextcloud/server
158165
path: nextcloud
159166

167+
160168
- name: Sign app
161169
run: |
162170
# Extracting release
@@ -173,7 +181,7 @@ jobs:
173181
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
174182
175183
- name: Attach tarball to github release
176-
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2
184+
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # v2.11.3
177185
id: attach_to_release
178186
with:
179187
repo_token: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
6-
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
6+
# SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
77
# SPDX-License-Identifier: MIT
88

9-
name: Dependabot
9+
name: Auto approve Dependabot PRs
1010

1111
on:
1212
pull_request_target: # zizmor: ignore[dangerous-triggers]
@@ -29,6 +29,8 @@ jobs:
2929
permissions:
3030
# for hmarr/auto-approve-action to approve PRs
3131
pull-requests: write
32+
# for alexwilson/enable-github-automerge-action to approve PRs
33+
contents: write
3234

3335
steps:
3436
- name: Disabled on forks
@@ -37,13 +39,20 @@ jobs:
3739
echo 'Can not approve PRs from forks'
3840
exit 1
3941
42+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+
id: branchname
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
4047
# GitHub actions bot approve
41-
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
48+
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4250
with:
4351
github-token: ${{ secrets.GITHUB_TOKEN }}
4452

45-
# Nextcloud bot approve and merge request
46-
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2
53+
# Enable GitHub auto merge
54+
- name: Auto merge
55+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4757
with:
48-
target: minor
49-
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
58+
github-token: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
name: info.xml lint
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828
with:
2929
persist-credentials: false
3030

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2929
with:
3030
persist-credentials: false
3131

@@ -34,7 +34,7 @@ jobs:
3434
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3535

3636
- name: Set up php${{ steps.versions.outputs.php-min }}
37-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
37+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
3838
with:
3939
php-version: ${{ steps.versions.outputs.php-min }}
4040
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

.github/workflows/lint-php.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
php-versions: ${{ steps.versions.outputs.php-versions }}
2525
steps:
2626
- name: Checkout app
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828
with:
2929
persist-credentials: false
3030

@@ -43,12 +43,12 @@ jobs:
4343

4444
steps:
4545
- name: Checkout
46-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4747
with:
4848
persist-credentials: false
4949

5050
- name: Set up php ${{ matrix.php-versions }}
51-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
51+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
5252
with:
5353
php-version: ${{ matrix.php-versions }}
5454
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite

.github/workflows/phpunit-mariadb.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2929
with:
3030
persist-credentials: false
3131

@@ -92,29 +92,29 @@ jobs:
9292
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9393
9494
- name: Checkout server
95-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
95+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9696
with:
9797
persist-credentials: false
9898
submodules: true
9999
repository: nextcloud/server
100100
ref: ${{ matrix.server-versions }}
101101

102102
- name: Checkout app
103-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
103+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
104104
with:
105105
persist-credentials: false
106106
path: apps/${{ env.APP_NAME }}
107107

108108
- name: Checkout app (richdocuments)
109-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
109+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
110110
with:
111111
persist-credentials: false
112112
path: apps/richdocuments
113113
repository: nextcloud/richdocuments
114114
ref: ${{ matrix.richdocuments-versions }}
115115

116116
- name: Set up php ${{ matrix.php-versions }}
117-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
117+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
118118
with:
119119
php-version: ${{ matrix.php-versions }}
120120
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-mysql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix: ${{ steps.versions.outputs.sparse-matrix }}
2525
steps:
2626
- name: Checkout app
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828
with:
2929
persist-credentials: false
3030

@@ -89,29 +89,29 @@ jobs:
8989
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9090
9191
- name: Checkout server
92-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
92+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9393
with:
9494
persist-credentials: false
9595
submodules: true
9696
repository: nextcloud/server
9797
ref: ${{ matrix.server-versions }}
9898

9999
- name: Checkout app
100-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
100+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
101101
with:
102102
persist-credentials: false
103103
path: apps/${{ env.APP_NAME }}
104104

105105
- name: Checkout app (richdocuments)
106-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
106+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
107107
with:
108108
persist-credentials: false
109109
path: apps/richdocuments
110110
repository: nextcloud/richdocuments
111111
ref: ${{ matrix.richdocuments-versions }}
112112

113113
- name: Set up php ${{ matrix.php-versions }}
114-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
114+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
115115
with:
116116
php-version: ${{ matrix.php-versions }}
117117
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-oci.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2929
with:
3030
persist-credentials: false
3131

@@ -71,28 +71,27 @@ jobs:
7171
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7272
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
7373
richdocuments-versions: ['stable32']
74+
oci-versions: ['18', '21', '23']
7475

75-
name: OCI PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
76+
name: OCI ${{ matrix.oci-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
7677

7778
services:
7879
oracle:
79-
image: ghcr.io/gvenzl/oracle-xe:11
80+
image: ghcr.io/gvenzl/oracle-${{ matrix.oci-versions < 23 && 'xe' || 'free' }}:${{ matrix.oci-versions }}
8081

8182
# Provide passwords and other environment variables to container
8283
env:
83-
ORACLE_RANDOM_PASSWORD: true
84-
APP_USER: autotest
85-
APP_USER_PASSWORD: owncloud
84+
ORACLE_PASSWORD: oracle
8685

8786
# Forward Oracle port
8887
ports:
89-
- 1521:1521/tcp
88+
- 1521:1521
9089

9190
# Provide healthcheck script options for startup
9291
options: >-
9392
--health-cmd healthcheck.sh
94-
--health-interval 10s
95-
--health-timeout 5s
93+
--health-interval 20s
94+
--health-timeout 10s
9695
--health-retries 10
9796
9897
steps:
@@ -103,29 +102,29 @@ jobs:
103102
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
104103
105104
- name: Checkout server
106-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
105+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
107106
with:
108107
persist-credentials: false
109108
submodules: true
110109
repository: nextcloud/server
111110
ref: ${{ matrix.server-versions }}
112111

113112
- name: Checkout app
114-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
113+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
115114
with:
116115
persist-credentials: false
117116
path: apps/${{ env.APP_NAME }}
118117

119118
- name: Checkout app (richdocuments)
120-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
119+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
121120
with:
122121
persist-credentials: false
123122
path: apps/richdocuments
124123
repository: nextcloud/richdocuments
125124
ref: ${{ matrix.richdocuments-versions }}
126125

127126
- name: Set up php ${{ matrix.php-versions }}
128-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
127+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
129128
with:
130129
php-version: ${{ matrix.php-versions }}
131130
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -160,7 +159,7 @@ jobs:
160159
DB_PORT: 1521
161160
run: |
162161
mkdir data
163-
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
162+
./occ maintenance:install --verbose --database=oci --database-name=${{ matrix.oci-versions < 23 && 'XE' || 'FREE' }} --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=system --database-pass=oracle --admin-user admin --admin-pass admin
164163
./occ app:enable --force ${{ env.APP_NAME }}
165164
166165
- name: Check PHPUnit script is defined

.github/workflows/phpunit-pgsql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
server-max: ${{ steps.versions.outputs.branches-max-list }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2929
with:
3030
persist-credentials: false
3131

@@ -93,29 +93,29 @@ jobs:
9393
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9494
9595
- name: Checkout server
96-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
96+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9797
with:
9898
persist-credentials: false
9999
submodules: true
100100
repository: nextcloud/server
101101
ref: ${{ matrix.server-versions }}
102102

103103
- name: Checkout app
104-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
105105
with:
106106
persist-credentials: false
107107
path: apps/${{ env.APP_NAME }}
108108

109109
- name: Checkout app (richdocuments)
110-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
111111
with:
112112
persist-credentials: false
113113
path: apps/richdocuments
114114
repository: nextcloud/richdocuments
115115
ref: ${{ matrix.richdocuments-versions }}
116116

117117
- name: Set up php ${{ matrix.php-versions }}
118-
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1
118+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
119119
with:
120120
php-version: ${{ matrix.php-versions }}
121121
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

0 commit comments

Comments
 (0)