Skip to content

Commit 048e901

Browse files
authored
Merge pull request #1943 from nextcloud-libraries/chore/sync-with-main
[next] chore: main branch sync
2 parents 0703dfd + e1c8818 commit 048e901

14 files changed

Lines changed: 743 additions & 582 deletions

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
@@ -27,7 +27,7 @@ jobs:
2727

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

.github/workflows/changelog-generate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.actor != 'dependabot[bot]'
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121
with:
2222
persist-credentials: false
2323

@@ -62,7 +62,7 @@ jobs:
6262
if: contains(steps.last_version.outputs.tag_name, steps.future_version.outputs.version) == false
6363

6464
- name: Upload changelog
65-
uses: actions/upload-artifact@v4
65+
uses: actions/upload-artifact@v5
6666
if: contains(steps.last_version.outputs.tag_name, steps.future_version.outputs.version) == false
6767
with:
6868
name: Changelog

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.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/documentation.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -14,40 +14,30 @@ on:
1414
types: [published]
1515

1616
permissions:
17-
contents: read
17+
contents: write
1818

1919
jobs:
2020
build-and-deploy:
2121
runs-on: ubuntu-latest
2222

2323
name: Build and deploy
2424
steps:
25-
- name: Check actor permission level
26-
# Only allow admin to deploy on release
27-
if: github.event.release
28-
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
29-
with:
30-
require: write
31-
3225
- name: Checkout
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3427
with:
3528
persist-credentials: false
3629

37-
- name: Read package.json node and npm engines version
38-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
30+
- name: Read package.json
31+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
3932
id: versions
40-
with:
41-
fallbackNode: '^20'
42-
fallbackNpm: '^10'
4333

44-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
45-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
34+
- name: Set up node
35+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
4636
with:
47-
node-version: ${{ steps.versions.outputs.nodeVersion }}
37+
node-version: ${{ steps.versions.outputs.node-version }}
4838

49-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
50-
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
39+
- name: Set up npm
40+
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
5141

5242
- name: Install dependencies & build
5343
env:

.github/workflows/fixup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors

.github/workflows/l10n.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,28 @@ jobs:
1313
name: Pot check
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1717
with:
1818
persist-credentials: false
1919

20-
- name: Read package.json node and npm engines version
21-
uses: skjnldsv/read-package-engines-version-actions@v3
20+
- name: Read package.json
21+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
2222
id: versions
23-
with:
24-
fallbackNode: '^20'
25-
fallbackNpm: '^10'
2623

27-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
28-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
24+
- name: Set up node
25+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2926
with:
30-
node-version: ${{ steps.versions.outputs.nodeVersion }}
27+
node-version: ${{ steps.versions.outputs.node-version }}
3128

32-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
33-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
29+
- name: Set up npm
30+
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
3431

35-
- name: Install dependencies
36-
run: npm ci
32+
- name: Install dependencies & build
33+
env:
34+
CYPRESS_INSTALL_BINARY: 0
35+
run: |
36+
npm ci
37+
npm run build --if-present
3738
3839
- name: Extract l10n files
3940
run: npm run l10n:extract

.github/workflows/node-test.yml

Lines changed: 13 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is provided via the organization template repository
22
#
3-
# https://github.com/nextcloud/.github
3+
# https://github.com/nextcloud-libraries/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
66
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -24,60 +24,27 @@ concurrency:
2424
cancel-in-progress: true
2525

2626
jobs:
27-
changes:
28-
runs-on: ubuntu-latest
29-
permissions:
30-
contents: read
31-
pull-requests: read
32-
33-
outputs:
34-
src: ${{ steps.changes.outputs.src}}
35-
36-
steps:
37-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
38-
id: changes
39-
continue-on-error: true
40-
with:
41-
filters: |
42-
src:
43-
- '.github/workflows/**'
44-
- '__tests__/**'
45-
- '__mocks__/**'
46-
- 'src/**'
47-
- 'appinfo/info.xml'
48-
- 'package.json'
49-
- 'package-lock.json'
50-
- 'tsconfig.json'
51-
- '**.js'
52-
- '**.ts'
53-
- '**.vue'
54-
5527
test:
5628
runs-on: ubuntu-latest
57-
58-
needs: changes
59-
if: needs.changes.outputs.src != 'false'
29+
name: node-tests
6030

6131
steps:
6232
- name: Checkout
63-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6434
with:
6535
persist-credentials: false
6636

67-
- name: Read package.json node and npm engines version
68-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
37+
- name: Read package.json
38+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
6939
id: versions
70-
with:
71-
fallbackNode: '^20'
72-
fallbackNpm: '^10'
7340

74-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
75-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
41+
- name: Set up node
42+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
7643
with:
77-
node-version: ${{ steps.versions.outputs.nodeVersion }}
44+
node-version: ${{ steps.versions.outputs.node-version }}
7845

79-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
80-
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
46+
- name: Set up npm
47+
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
8148

8249
- name: Install dependencies & build
8350
env:
@@ -93,20 +60,8 @@ jobs:
9360
run: npm run test:coverage --if-present
9461

9562
- name: Collect coverage
96-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
63+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
9764
with:
9865
files: ./coverage/lcov.info
99-
100-
summary:
101-
permissions:
102-
contents: none
103-
runs-on: ubuntu-latest
104-
needs: [changes, test]
105-
106-
if: always()
107-
108-
name: test-summary
109-
110-
steps:
111-
- name: Summary status
112-
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
66+
env:
67+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)