Skip to content

Commit 2d486f4

Browse files
authored
Merge pull request #1028 from nextcloud/automated/noid/stable34-update-workflows
[stable34] ci(actions): Update workflow templates from organization template repository
2 parents 8562868 + 9b75d4c commit 2d486f4

13 files changed

Lines changed: 99 additions & 36 deletions

.github/actions-lock.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: MIT
3+
25fc4c7e69e778e20bdc9eb0cc96367e block-merge-freeze.yml
4+
5a7b85f72877c560683ba523ffad11cc block-unconventional-commits.yml
5+
e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml
6+
2581a67c5bcdcd570427e6d51db767d7 fixup.yml
7+
870b483dbcbca59479211270d61546dd lint-php-cs.yml
8+
ee2b04d185b82fe7dd6fe6d83c6c7b45 lint-php.yml
9+
5cb2cca6386e45c0c9061192798b37a8 phpunit-mariadb.yml
10+
d676be1ed03142832d8e712962f5961c phpunit-mysql.yml
11+
ec26ef77882d1c19cba1ce168f927c2b phpunit-oci.yml
12+
e92532f6ac32d39a1ff5c5d57b9686ba phpunit-pgsql.yml
13+
9e8a660a88b8253f33593880710f1df3 phpunit-sqlite.yml
14+
3c4a096b3b7dbaef0f8e5190ffe13518 pr-feedback.yml
15+
20b5d0d45766e3793f19c9c0c8d05140 psalm.yml
16+
3975dc58817119d596a8f6ed190352ce reuse.yml
17+
a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml
18+
39db87018db395caf41007931817cdbd update-nextcloud-ocp.yml

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
30+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3131
with:
3232
persist-credentials: false
3333

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

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
auto-approve-merge:
2727
if: github.event.pull_request.user.login == 'dependabot[bot]'
2828
runs-on: ubuntu-latest-low
29+
env:
30+
# env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 2.0.0
31+
ALLOW_MAJOR: false
32+
# env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 1.1.0
33+
ALLOW_MINOR: true
34+
# env variable for maintainers: RegExp string to ignore some dependencies from auto-approve and auto-merge
35+
IGNORE_PATTERN: ''
2936
permissions:
3037
# for auto-approve step to work
3138
pull-requests: write
@@ -46,12 +53,32 @@ jobs:
4653

4754
- name: Dependabot metadata
4855
id: metadata
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4957
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
5058
with:
5159
github-token: ${{ secrets.GITHUB_TOKEN }}
5260

53-
- name: GitHub actions bot approve
61+
- name: Check for ignored dependencies in the PR
62+
id: validate
5463
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
64+
env:
65+
IGNORE_PATTERN: ${{ env.IGNORE_PATTERN }}
66+
DEPENDENCY_NAMES: ${{ steps.metadata.outputs.dependency-names }}
67+
run: |
68+
if [[ -z ${IGNORE_PATTERN} ]]; then
69+
echo "ignore=false" >> "$GITHUB_OUTPUT"
70+
elif [[ -z ${DEPENDENCY_NAMES} ]]; then
71+
echo "ignore=false" >> "$GITHUB_OUTPUT"
72+
elif [[ ${DEPENDENCY_NAMES} =~ ${IGNORE_PATTERN} ]]; then
73+
echo "ignore=true" >> "$GITHUB_OUTPUT"
74+
fi
75+
76+
- name: GitHub actions bot approve
77+
id: auto_approve
78+
if: ${{
79+
startsWith(steps.branchname.outputs.branch, 'dependabot/')
80+
&& steps.validate.outputs.ignore != 'true'
81+
}}
5582
run: gh pr review --approve "$PR_URL"
5683
env:
5784
PR_URL: ${{ github.event.pull_request.html_url }}
@@ -60,6 +87,15 @@ jobs:
6087
# Enable GitHub auto merge
6188
- name: Auto merge
6289
uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0
63-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
90+
if: ${{
91+
startsWith(steps.branchname.outputs.branch, 'dependabot/')
92+
&& steps.auto_approve.conclusion == 'success'
93+
&& (github.event.action == 'opened' || github.event.action == 'reopened')
94+
&& (
95+
steps.metadata.outputs.update-type == 'version-update:semver-patch'
96+
|| (fromJSON(env.ALLOW_MINOR) && steps.metadata.outputs.update-type == 'version-update:semver-minor')
97+
|| (fromJSON(env.ALLOW_MAJOR) && steps.metadata.outputs.update-type == 'version-update:semver-major')
98+
)
99+
}}
64100
with:
65101
github-token: ${{ secrets.GITHUB_TOKEN }}

.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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

@@ -34,7 +34,7 @@ jobs:
3434
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3535

3636
- name: Set up php${{ steps.versions.outputs.php-min }}
37-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
37+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
php-max: ${{ steps.versions.outputs.php-max }}
2626
steps:
2727
- name: Checkout app
28-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

@@ -34,7 +34,7 @@ jobs:
3434
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3535

3636
php-lint:
37-
runs-on: ubuntu-latest
37+
runs-on: ubuntu-latest-low
3838
needs: matrix
3939
strategy:
4040
matrix:
@@ -44,12 +44,12 @@ jobs:
4444

4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
47+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4848
with:
4949
persist-credentials: false
5050

5151
- name: Set up php ${{ matrix.php-versions }}
52-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
52+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
5353
with:
5454
php-version: ${{ matrix.php-versions }}
5555
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 & 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

@@ -67,6 +67,7 @@ jobs:
6767
if: needs.changes.outputs.src != 'false'
6868

6969
strategy:
70+
fail-fast: false
7071
matrix:
7172
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7273
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
@@ -91,21 +92,21 @@ jobs:
9192
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9293
9394
- name: Checkout server
94-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
95+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
9596
with:
9697
persist-credentials: false
9798
submodules: true
9899
repository: nextcloud/server
99100
ref: ${{ matrix.server-versions }}
100101

101102
- name: Checkout app
102-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
103+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
103104
with:
104105
persist-credentials: false
105106
path: apps/${{ env.APP_NAME }}
106107

107108
- name: Set up php ${{ matrix.php-versions }}
108-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
109+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
109110
with:
110111
php-version: ${{ matrix.php-versions }}
111112
# 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 & 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
27+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2828
with:
2929
persist-credentials: false
3030

@@ -68,6 +68,7 @@ jobs:
6868
if: needs.changes.outputs.src != 'false'
6969

7070
strategy:
71+
fail-fast: false
7172
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
7273

7374
name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
@@ -89,21 +90,21 @@ jobs:
8990
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9091
9192
- name: Checkout server
92-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
93+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
9394
with:
9495
persist-credentials: false
9596
submodules: true
9697
repository: nextcloud/server
9798
ref: ${{ matrix.server-versions }}
9899

99100
- name: Checkout app
100-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
101+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
101102
with:
102103
persist-credentials: false
103104
path: apps/${{ env.APP_NAME }}
104105

105106
- name: Set up php ${{ matrix.php-versions }}
106-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
107+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
107108
with:
108109
php-version: ${{ matrix.php-versions }}
109110
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-oci.yml

Lines changed: 5 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

@@ -67,6 +67,7 @@ jobs:
6767
if: needs.changes.outputs.src != 'false'
6868

6969
strategy:
70+
fail-fast: false
7071
matrix:
7172
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7273
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
@@ -101,21 +102,21 @@ jobs:
101102
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
102103
103104
- name: Checkout server
104-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
105+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
105106
with:
106107
persist-credentials: false
107108
submodules: true
108109
repository: nextcloud/server
109110
ref: ${{ matrix.server-versions }}
110111

111112
- name: Checkout app
112-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
113+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
113114
with:
114115
persist-credentials: false
115116
path: apps/${{ env.APP_NAME }}
116117

117118
- name: Set up php ${{ matrix.php-versions }}
118-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
119+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
119120
with:
120121
php-version: ${{ matrix.php-versions }}
121122
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-pgsql.yml

Lines changed: 5 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

@@ -67,6 +67,7 @@ jobs:
6767
if: needs.changes.outputs.src != 'false'
6868

6969
strategy:
70+
fail-fast: false
7071
matrix:
7172
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7273
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
@@ -92,21 +93,21 @@ jobs:
9293
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9394
9495
- name: Checkout server
95-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
96+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
9697
with:
9798
persist-credentials: false
9899
submodules: true
99100
repository: nextcloud/server
100101
ref: ${{ matrix.server-versions }}
101102

102103
- name: Checkout app
103-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
104+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
104105
with:
105106
persist-credentials: false
106107
path: apps/${{ env.APP_NAME }}
107108

108109
- name: Set up php ${{ matrix.php-versions }}
109-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
110+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
110111
with:
111112
php-version: ${{ matrix.php-versions }}
112113
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

.github/workflows/phpunit-sqlite.yml

Lines changed: 5 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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

@@ -67,6 +67,7 @@ jobs:
6767
if: needs.changes.outputs.src != 'false'
6868

6969
strategy:
70+
fail-fast: false
7071
matrix:
7172
php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
7273
server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
@@ -81,21 +82,21 @@ jobs:
8182
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
8283
8384
- name: Checkout server
84-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
85+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
8586
with:
8687
persist-credentials: false
8788
submodules: true
8889
repository: nextcloud/server
8990
ref: ${{ matrix.server-versions }}
9091

9192
- name: Checkout app
92-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
93+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
9394
with:
9495
persist-credentials: false
9596
path: apps/${{ env.APP_NAME }}
9697

9798
- name: Set up php ${{ matrix.php-versions }}
98-
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
99+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
99100
with:
100101
php-version: ${{ matrix.php-versions }}
101102
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

0 commit comments

Comments
 (0)