Skip to content

Commit 49de7c9

Browse files
committed
chore: Update dependencies and workflows
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent 36c1228 commit 49de7c9

26 files changed

Lines changed: 2635 additions & 1998 deletions

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

Lines changed: 16 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
91+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
9192
with:
9293
php-version: ${{ steps.php-versions.outputs.php-min }}
9394
coverage: none
@@ -96,15 +97,17 @@ jobs:
9697

9798
- name: Check composer.json
9899
id: check_composer
99-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
100+
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
100101
with:
101102
files: "${{ env.APP_NAME }}/composer.json"
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
@@ -118,7 +121,7 @@ jobs:
118121
119122
- name: Check Krankerl config
120123
id: krankerl
121-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
124+
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
122125
with:
123126
files: ${{ env.APP_NAME }}/krankerl.toml
124127

@@ -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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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@b98a3b12e86552593f3e4e577ca8a62aa2f3f22b # v2.11.4
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/block-unconventional-commits.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3131
with:
3232
persist-credentials: false
3333

34-
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
34+
- uses: webiny/action-conventional-commits@7f91b1595ca1951cdb671ddc9f07a49081ec5b69 # v1.4.2
3535
with:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 62 additions & 10 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]
@@ -24,11 +24,20 @@ concurrency:
2424

2525
jobs:
2626
auto-approve-merge:
27-
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]'
27+
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
39+
# for alexwilson/enable-github-automerge-action to approve PRs
40+
contents: write
3241

3342
steps:
3443
- name: Disabled on forks
@@ -37,13 +46,56 @@ jobs:
3746
echo 'Can not approve PRs from forks'
3847
exit 1
3948
40-
# GitHub actions bot approve
41-
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
49+
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
50+
id: branchname
51+
with:
52+
repo-token: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Dependabot metadata
55+
id: metadata
56+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
57+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
4258
with:
4359
github-token: ${{ secrets.GITHUB_TOKEN }}
4460

45-
# Nextcloud bot approve and merge request
46-
- uses: ahmadnassri/action-dependabot-auto-merge@45fc124d949b19b6b8bf6645b6c9d55f4f9ac61a # v2
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+
87+
# Enable GitHub auto merge
88+
- name: Auto merge
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+
}}
47100
with:
48-
target: minor
49-
github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
101+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 5 additions & 5 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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
31+
- uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
3232
id: changes
3333
continue-on-error: true
3434
with:
@@ -56,19 +56,19 @@ jobs:
5656

5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6060
with:
6161
persist-credentials: false
6262

6363
- name: Read package.json node and npm engines version
6464
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
6565
id: versions
6666
with:
67-
fallbackNode: '^20'
68-
fallbackNpm: '^10'
67+
fallbackNode: '^24'
68+
fallbackNpm: '^11.3'
6969

7070
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
71-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
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: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

3232
- name: Get php version
3333
id: versions
34-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
34+
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@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.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: |
48-
composer remove nextcloud/ocp --dev
49-
composer i
48+
composer remove nextcloud/ocp --dev --no-scripts
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: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,35 @@ jobs:
2121
matrix:
2222
runs-on: ubuntu-latest-low
2323
outputs:
24-
php-versions: ${{ steps.versions.outputs.php-versions }}
24+
php-min: ${{ steps.versions.outputs.php-min }}
25+
php-max: ${{ steps.versions.outputs.php-max }}
2526
steps:
2627
- name: Checkout app
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2829
with:
2930
persist-credentials: false
3031

3132
- name: Get version matrix
3233
id: versions
33-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
34+
uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2
3435

3536
php-lint:
36-
runs-on: ubuntu-latest
37+
runs-on: ubuntu-latest-low
3738
needs: matrix
3839
strategy:
3940
matrix:
40-
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
41+
php-versions: ['${{ needs.matrix.outputs.php-min }}', '${{ needs.matrix.outputs.php-max }}']
4142

4243
name: php-lint
4344

4445
steps:
4546
- name: Checkout
46-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4748
with:
4849
persist-credentials: false
4950

5051
- name: Set up php ${{ matrix.php-versions }}
51-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
52+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
5253
with:
5354
php-version: ${{ matrix.php-versions }}
5455
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2929
with:
3030
persist-credentials: false
3131

3232
- name: Read package.json node and npm engines version
3333
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
3434
id: versions
3535
with:
36-
fallbackNode: '^20'
37-
fallbackNpm: '^10'
36+
fallbackNode: '^24'
37+
fallbackNpm: '^11.3'
3838

3939
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
40-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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)