Skip to content

Commit 7c3f555

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

20 files changed

Lines changed: 207 additions & 177 deletions

.github/actions-lock.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: MIT
3+
fe1239ed98a163abbdea3e0490c85458 appstore-build-publish.yml
4+
e6351c608939c31ae1e32923aa82aa10 dependabot-approve-merge.yml
5+
2581a67c5bcdcd570427e6d51db767d7 fixup.yml
6+
985f3ac7d51405c1601c742832a14120 lint-eslint.yml
7+
43fd0c5fb704cabc5f11cdfaf513236d lint-info-xml.yml
8+
4b40dd0073e16f74dd04e6d49dcc043d lint-php-cs.yml
9+
cfb31e47b6e9ab65e76c89b028754a4e lint-php.yml
10+
ab3a506506b1d7c1cea9593ecfd84366 lint-stylelint.yml
11+
03759c9dc0fa748cb927b9f9cadf2925 node.yml
12+
076e72a19e7bdf35ac5b2abee0198c43 phpunit-mariadb.yml
13+
8fab08ac7da700ee304af0bf3c18b3a3 phpunit-mysql.yml
14+
bbe9834ddb89207caf5e19d79ebb3672 phpunit-oci.yml
15+
256bf1dead4ef8479e9ce7433f871548 phpunit-pgsql.yml
16+
4ca2c2c4b1a73182667bab908e57c185 phpunit-sqlite.yml
17+
d1821b8a816578070ed8fd018f321f6d pr-feedback.yml
18+
43878db2acac51746332618c9f731553 psalm-matrix.yml
19+
bea8a43904976fa01f1e091046541b37 release-relay.yml
20+
2dbec18233063b42f4d8e03bbb43671c reuse.yml
21+
94c65e30a77686c079c6dfa54a008440 sync-workflow-templates.yml
22+
a3440826636c0fd7c2d20b1de50363da update-nextcloud-ocp-approve-merge.yml
23+
7cc949cd51ea5d604986bbdcb75c95c7 update-nextcloud-ocp-matrix.yml

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

Lines changed: 14 additions & 11 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3939
with:
4040
persist-credentials: false
4141
path: ${{ env.APP_NAME }}
@@ -71,9 +71,10 @@ jobs:
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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
74+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
7575
with:
7676
node-version: ${{ steps.versions.outputs.nodeVersion }}
77+
package-manager-cache: false
7778

7879
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
7980
# Skip if no package.json
@@ -87,7 +88,7 @@ jobs:
8788
filename: ${{ env.APP_NAME }}/appinfo/info.xml
8889

8990
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
90-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
91+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
9192
with:
9293
php-version: ${{ steps.php-versions.outputs.php-min }}
9394
coverage: none
@@ -102,9 +103,11 @@ jobs:
102103

103104
- name: Install composer dependencies
104105
if: steps.check_composer.outputs.files_exists == 'true'
105-
run: |
106-
cd ${{ env.APP_NAME }}
107-
composer install --no-dev
106+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
107+
with:
108+
composer-options: '--no-dev'
109+
working-directory: ${{ env.APP_NAME }}
110+
ignore-cache: 'yes'
108111

109112
- name: Build ${{ env.APP_NAME }}
110113
# Skip if no package.json
@@ -156,7 +159,7 @@ jobs:
156159
unzip nextcloud.zip
157160
158161
- name: Checkout server master fallback
159-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
162+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
160163
if: ${{ steps.server-download.outcome != 'success' }}
161164
with:
162165
persist-credentials: false
@@ -172,7 +175,7 @@ jobs:
172175
tar -xvf ${{ env.APP_NAME }}.tar.gz
173176
cd ../../../
174177
# Setting up keys
175-
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key # zizmor: ignore[secrets-outside-env]
178+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
176179
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
177180
# Signing
178181
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
@@ -181,7 +184,7 @@ jobs:
181184
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
182185
183186
- name: Attach tarball to github release
184-
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # v2.11.5
187+
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # 2.11.5
185188
id: attach_to_release
186189
with:
187190
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -194,6 +197,6 @@ jobs:
194197
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1.0.3
195198
with:
196199
app_name: ${{ env.APP_NAME }}
197-
appstore_token: ${{ secrets.APPSTORE_TOKEN }} # zizmor: ignore[secrets-outside-env]
200+
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
198201
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }}
199-
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} # zizmor: ignore[secrets-outside-env]
202+
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}

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

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,15 @@ 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:
30-
# for hmarr/auto-approve-action to approve PRs
37+
# for auto-approve step to work
3138
pull-requests: write
3239
# for alexwilson/enable-github-automerge-action to approve PRs
3340
contents: write
@@ -44,15 +51,51 @@ jobs:
4451
with:
4552
repo-token: ${{ secrets.GITHUB_TOKEN }}
4653

47-
# GitHub actions bot approve
48-
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
54+
- name: Dependabot metadata
55+
id: metadata
4956
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

61+
- name: Check for ignored dependencies in the PR
62+
id: validate
63+
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+
}}
82+
run: gh pr review --approve "$PR_URL"
83+
env:
84+
PR_URL: ${{ github.event.pull_request.html_url }}
85+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
5387
# Enable GitHub auto merge
5488
- name: Auto merge
55-
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
56-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.pull_request.action == 'opened' || github.event.pull_request.action == 'reopened')
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+
}}
57100
with:
58101
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
src: ${{ steps.changes.outputs.src}}
2929

3030
steps:
31-
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
31+
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
3232
id: changes
3333
continue-on-error: true
3434
with:
@@ -56,7 +56,7 @@ jobs:
5656

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

@@ -68,7 +68,7 @@ jobs:
6868
fallbackNpm: '^11.3'
6969

7070
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
71-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
71+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
7272
with:
7373
node-version: ${{ steps.versions.outputs.nodeVersion }}
7474

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
name: info.xml lint
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2828
with:
2929
persist-credentials: false
30+
sparse-checkout: |
31+
appinfo/
3032
3133
- name: Download schema
3234
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd

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

Lines changed: 6 additions & 4 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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 # v2.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
@@ -43,10 +43,12 @@ jobs:
4343
env:
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545

46-
- name: Install dependencies
46+
- name: Remove nextcloud/ocp
4747
run: |
4848
composer remove nextcloud/ocp --dev --no-scripts
49-
composer i
49+
50+
- name: Install composer dependencies
51+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
5052

5153
- name: Lint
5254
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

.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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4848
with:
4949
persist-credentials: false
5050

5151
- name: Set up php ${{ matrix.php-versions }}
52-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.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: 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929
with:
3030
persist-credentials: false
3131

@@ -37,7 +37,7 @@ jobs:
3737
fallbackNpm: '^11.3'
3838

3939
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
40-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
40+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
4141
with:
4242
node-version: ${{ steps.versions.outputs.nodeVersion }}
4343

0 commit comments

Comments
 (0)