Skip to content

Commit e5f5e1f

Browse files
ci(actions): Update workflow templates from organization template repository
Signed-off-by: GitHub <noreply@github.com>
1 parent 58a05fc commit e5f5e1f

16 files changed

Lines changed: 87 additions & 50 deletions

.github/actions-lock.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
# SPDX-License-Identifier: MIT
33
9f2b534bea27e8ec2dda7c1d772a664b block-merge-eol.yml
44
25fc4c7e69e778e20bdc9eb0cc96367e block-merge-freeze.yml
5-
a5a8fc40c0f979c2d799ae114a0b840b command-compile.yml
6-
d00c282925ce19918cc26ec0827d9726 dependabot-approve-merge.yml
5+
46e653f77f1e1054dcf113bf2bab7eab command-compile.yml
6+
e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml
77
2581a67c5bcdcd570427e6d51db767d7 fixup.yml
8-
7bcfba381bfb7c28d9ef6a7d55ac937b lint-eslint.yml
9-
058024e4560ae1f18f6e4be9ecc0dacb lint-php-cs.yml
10-
d86aa09feb6ce2ad244926aff7adcb36 lint-php.yml
11-
bd5b5245dc07b5779031e13817663a3e lint-stylelint.yml
8+
2a205b6cc57c26c31a18a7f41190f3e2 lint-eslint.yml
9+
870b483dbcbca59479211270d61546dd lint-php-cs.yml
10+
ee2b04d185b82fe7dd6fe6d83c6c7b45 lint-php.yml
11+
351799835db66dd8d20e324970490e96 lint-stylelint.yml
1212
03759c9dc0fa748cb927b9f9cadf2925 node.yml
13-
20d567b2158851c6b54170e0a7c7fc30 npm-audit-fix.yml
14-
efac00595fcf8c91902a40467bb8e58a phpunit-mysql.yml
15-
ea1ad2b41d5c8730af03c2923fd0d90d phpunit-oci.yml
16-
5f7de35e496afb4f1206fe18017d6320 phpunit-pgsql.yml
17-
10d907363827d671d37831b78c0a1137 phpunit-sqlite.yml
13+
7e9fa275fffbfef58e6348a44750e2ec npm-audit-fix.yml
14+
07e60b2f304c749ee563f1256caf2793 phpunit-mysql.yml
15+
b98798d397dd45f12c777038d230509e phpunit-oci.yml
16+
4bf29a4d193f83443d16d368c60a7870 phpunit-pgsql.yml
17+
21244b02c3f1ad7d78951ba1b876638f phpunit-sqlite.yml
1818
3c4a096b3b7dbaef0f8e5190ffe13518 pr-feedback.yml
19-
a965b7d4820a97cc232a24f6caf90d95 psalm.yml
20-
7db5b820f3750eebe988005a0bb2febd reuse.yml
21-
9dc6b717be0006fc7974a50351686fd7 sync-workflow-templates.yml
19+
20b5d0d45766e3793f19c9c0c8d05140 psalm.yml
20+
3975dc58817119d596a8f6ed190352ce reuse.yml
21+
9799b1a6a842b5c0076b76de651a0e0d sync-workflow-templates.yml
22+
fcdb95d98ab64de64587191bbd71b2cb npm-build.yml

.github/workflows/command-compile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
key: git-repo
104104

105105
- name: Checkout ${{ needs.init.outputs.head_ref }}
106-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
107107
with:
108108
persist-credentials: false
109109
token: ${{ secrets.COMMAND_BOT_PAT }}

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

Lines changed: 40 additions & 4 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,20 +53,49 @@ jobs:
4653

4754
- name: Dependabot metadata
4855
id: metadata
49-
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
57+
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 }}
5885
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5986

6087
# Enable GitHub auto merge
6188
- name: Auto merge
62-
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # 2.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')
89+
uses: alexwilson/enable-github-automerge-action@2c32e18a76e0726ffe7a573bfff2d42a20885126 # 3.0.0
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-eslint.yml

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

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6060
with:
6161
persist-credentials: false
6262

.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
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/lint-stylelint.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

.github/workflows/npm-audit-fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
- name: Checkout
3737
id: checkout
38-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3939
with:
4040
persist-credentials: false
4141
ref: ${{ matrix.branches }}

.github/workflows/npm-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
name: NPM build
5454
steps:
5555
- name: Checkout
56-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
56+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5757
with:
5858
persist-credentials: false
5959

.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2828
with:
2929
persist-credentials: false
3030

@@ -89,21 +89,21 @@ jobs:
8989
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
9090
9191
- name: Checkout server
92-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
92+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
100+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
101101
with:
102102
persist-credentials: false
103103
path: apps/${{ env.APP_NAME }}
104104

105105
- name: Set up php ${{ matrix.php-versions }}
106-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
106+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
107107
with:
108108
php-version: ${{ matrix.php-versions }}
109109
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

0 commit comments

Comments
 (0)