Skip to content

Commit 599fe7e

Browse files
nickvergessenbackportbot[bot]
authored andcommitted
ci(actions): Update workflows
Signed-off-by: Joas Schilling <coding@schilljs.com> [skip ci]
1 parent 55f632c commit 599fe7e

13 files changed

Lines changed: 74 additions & 56 deletions

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3636
with:
3737
persist-credentials: false
3838
path: ${{ env.APP_NAME }}
@@ -62,8 +62,8 @@ jobs:
6262
continue-on-error: true
6363
with:
6464
path: ${{ env.APP_NAME }}
65-
fallbackNode: '^20'
66-
fallbackNpm: '^10'
65+
fallbackNode: '^24'
66+
fallbackNpm: '^11.3'
6767

6868
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
6969
# Skip if no package.json
@@ -137,23 +137,31 @@ jobs:
137137
cd ${{ env.APP_NAME }}
138138
make appstore
139139
140-
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
141-
continue-on-error: true
142-
id: server-checkout
140+
- name: Check server download link for ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
143141
run: |
144142
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
145-
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
146-
unzip latest-$NCVERSION.zip
143+
DOWNLOAD_URL=$(curl -s "https://updates.nextcloud.com/updater_server/latest?channel=beta&version=$NCVERSION" | jq -r '.downloads.zip[0]')
144+
echo "DOWNLOAD_URL=$DOWNLOAD_URL" >> $GITHUB_ENV
145+
146+
- name: Download server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
147+
continue-on-error: true
148+
id: server-download
149+
if: ${{ env.DOWNLOAD_URL != 'null' }}
150+
run: |
151+
echo "Downloading release tarball from $DOWNLOAD_URL"
152+
wget $DOWNLOAD_URL -O nextcloud.zip
153+
unzip nextcloud.zip
147154
148155
- name: Checkout server master fallback
149-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
150-
if: ${{ steps.server-checkout.outcome != 'success' }}
156+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
157+
if: ${{ steps.server-download.outcome != 'success' }}
151158
with:
152159
persist-credentials: false
153160
submodules: true
154161
repository: nextcloud/server
155162
path: nextcloud
156163

164+
157165
- name: Sign app
158166
run: |
159167
# Extracting release

.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: 1 addition & 1 deletion
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

.github/workflows/lint-php.yml

Lines changed: 2 additions & 2 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,7 +43,7 @@ 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

.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: 4 additions & 4 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

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

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

104104
- name: Checkout app (richdocuments)
105-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
105+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
106106
with:
107107
persist-credentials: false
108108
path: apps/richdocuments

.github/workflows/phpunit-oci.yml

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

@@ -72,27 +72,25 @@ jobs:
7272
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
7373
richdocuments-versions: ['stable31']
7474

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

7777
services:
7878
oracle:
79-
image: ghcr.io/gvenzl/oracle-xe:11
79+
image: ghcr.io/gvenzl/oracle-${{ matrix.oci-versions < 23 && 'xe' || 'free' }}:${{ matrix.oci-versions }}
8080

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

8785
# Forward Oracle port
8886
ports:
89-
- 1521:1521/tcp
87+
- 1521:1521
9088

9189
# Provide healthcheck script options for startup
9290
options: >-
9391
--health-cmd healthcheck.sh
94-
--health-interval 10s
95-
--health-timeout 5s
92+
--health-interval 20s
93+
--health-timeout 10s
9694
--health-retries 10
9795
9896
steps:
@@ -102,21 +100,21 @@ jobs:
102100
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
103101
104102
- name: Checkout server
105-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
103+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
106104
with:
107105
persist-credentials: false
108106
submodules: true
109107
repository: nextcloud/server
110108
ref: ${{ matrix.server-versions }}
111109

112110
- name: Checkout app
113-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
111+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
114112
with:
115113
persist-credentials: false
116114
path: apps/${{ env.APP_NAME }}
117115

118116
- name: Checkout app (richdocuments)
119-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
120118
with:
121119
persist-credentials: false
122120
path: apps/richdocuments
@@ -159,7 +157,7 @@ jobs:
159157
DB_PORT: 1521
160158
run: |
161159
mkdir data
162-
./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
160+
./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
163161
./occ app:enable --force ${{ env.APP_NAME }}
164162
165163
- name: Check PHPUnit script is defined

.github/workflows/phpunit-pgsql.yml

Lines changed: 4 additions & 4 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,21 +92,21 @@ 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

.github/workflows/phpunit-sqlite.yml

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

@@ -81,21 +81,21 @@ jobs:
8181
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
8282
8383
- name: Checkout server
84-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
84+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
8585
with:
8686
persist-credentials: false
8787
submodules: true
8888
repository: nextcloud/server
8989
ref: ${{ matrix.server-versions }}
9090

9191
- name: Checkout app
92-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
92+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9393
with:
9494
persist-credentials: false
9595
path: apps/${{ env.APP_NAME }}
9696

9797
- name: Checkout app (richdocuments)
98-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
98+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9999
with:
100100
persist-credentials: false
101101
path: apps/richdocuments

0 commit comments

Comments
 (0)