Skip to content

Commit 09bc638

Browse files
committed
chore: update workflows from templates
Signed-off-by: skjnldsv <[email protected]>
1 parent 9a90cd4 commit 09bc638

15 files changed

+121
-80
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Build and publish app release
710

@@ -29,7 +32,7 @@ jobs:
2932
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3033
3134
- name: Checkout
32-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3336
with:
3437
path: ${{ env.APP_NAME }}
3538

@@ -41,7 +44,7 @@ jobs:
4144
expression: "//info//dependencies//nextcloud/@min-version"
4245

4346
- name: Read package.json node and npm engines version
44-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
47+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4548
id: versions
4649
# Continue if no package.json
4750
continue-on-error: true
@@ -60,7 +63,7 @@ jobs:
6063
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
6164
# Skip if no package.json
6265
if: ${{ steps.versions.outputs.npmVersion }}
63-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
66+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
6467

6568
- name: Get php version
6669
id: php-versions
@@ -69,7 +72,7 @@ jobs:
6972
filename: ${{ env.APP_NAME }}/appinfo/info.xml
7073

7174
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
72-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
75+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
7376
with:
7477
php-version: ${{ steps.php-versions.outputs.php-min }}
7578
coverage: none
@@ -78,7 +81,7 @@ jobs:
7881

7982
- name: Check composer.json
8083
id: check_composer
81-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
84+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
8285
with:
8386
files: "${{ env.APP_NAME }}/composer.json"
8487

@@ -92,15 +95,15 @@ jobs:
9295
# Skip if no package.json
9396
if: ${{ steps.versions.outputs.nodeVersion }}
9497
env:
95-
CYPRESS_INSTALL_BINARY: 0
98+
NODE_ENV: production
9699
run: |
97100
cd ${{ env.APP_NAME }}
98101
npm ci
99-
npm run build
102+
npm run build --if-present
100103
101104
- name: Check Krankerl config
102105
id: krankerl
103-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
106+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
104107
with:
105108
files: ${{ env.APP_NAME }}/krankerl.toml
106109

@@ -126,12 +129,12 @@ jobs:
126129
continue-on-error: true
127130
id: server-checkout
128131
run: |
129-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
132+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
130133
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
131134
unzip latest-$NCVERSION.zip
132135
133136
- name: Checkout server master fallback
134-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
137+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
135138
if: ${{ steps.server-checkout.outcome != 'success' }}
136139
with:
137140
submodules: true
@@ -145,7 +148,7 @@ jobs:
145148
tar -xvf ${{ env.APP_NAME }}.tar.gz
146149
cd ../../../
147150
# Setting up keys
148-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
151+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
149152
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
150153
# Signing
151154
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 }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
pull-requests: write
3232

3333
steps:
34-
# Github actions bot approve
34+
# GitHub actions bot approve
3535
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
3636
with:
3737
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/fixup.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Block fixup and squash commits
710

@@ -28,6 +31,6 @@ jobs:
2831

2932
steps:
3033
- name: Run check
31-
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1
34+
uses: skjnldsv/block-fixup-merge-action@c138ea99e45e186567b64cf065ce90f7158c236a # v2
3235
with:
3336
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55
#
6-
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
7-
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
88

99
name: Lint eslint
1010

@@ -20,6 +20,9 @@ concurrency:
2020
jobs:
2121
changes:
2222
runs-on: ubuntu-latest-low
23+
permissions:
24+
contents: read
25+
pull-requests: read
2326

2427
outputs:
2528
src: ${{ steps.changes.outputs.src}}
@@ -53,10 +56,10 @@ jobs:
5356

5457
steps:
5558
- name: Checkout
56-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
59+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5760

5861
- name: Read package.json node and npm engines version
59-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
62+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
6063
id: versions
6164
with:
6265
fallbackNode: '^20'
@@ -68,7 +71,7 @@ jobs:
6871
node-version: ${{ steps.versions.outputs.nodeVersion }}
6972

7073
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
71-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
74+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
7275

7376
- name: Install dependencies
7477
env:

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint info.xml
710

@@ -21,7 +24,7 @@ jobs:
2124
name: info.xml lint
2225
steps:
2326
- name: Checkout
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2528

2629
- name: Download schema
2730
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php-cs
710

@@ -22,17 +25,17 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2629

2730
- name: Get php version
2831
id: versions
2932
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
3033

3134
- name: Set up php${{ steps.versions.outputs.php-available }}
32-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
35+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
3336
with:
3437
php-version: ${{ steps.versions.outputs.php-available }}
35-
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite, ldap
38+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3639
coverage: none
3740
ini-file: development
3841
env:

.github/workflows/lint-php.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint php
710

@@ -21,7 +24,7 @@ jobs:
2124
php-versions: ${{ steps.versions.outputs.php-versions }}
2225
steps:
2326
- name: Checkout app
24-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2528
- name: Get version matrix
2629
id: versions
2730
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
@@ -37,13 +40,13 @@ jobs:
3740

3841
steps:
3942
- name: Checkout
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
43+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4144

4245
- name: Set up php ${{ matrix.php-versions }}
43-
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
46+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
4447
with:
4548
php-version: ${{ matrix.php-versions }}
46-
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite, ldap
49+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
4750
coverage: none
4851
ini-file: development
4952
env:

.github/workflows/lint-stylelint.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Lint stylelint
710

@@ -22,10 +25,10 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2629

2730
- name: Read package.json node and npm engines version
28-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
31+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
2932
id: versions
3033
with:
3134
fallbackNode: '^20'
@@ -37,7 +40,7 @@ jobs:
3740
node-version: ${{ steps.versions.outputs.nodeVersion }}
3841

3942
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
40-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
43+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
4144

4245
- name: Install dependencies
4346
env:

.github/workflows/node.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Node
710

@@ -17,6 +20,9 @@ concurrency:
1720
jobs:
1821
changes:
1922
runs-on: ubuntu-latest-low
23+
permissions:
24+
contents: read
25+
pull-requests: read
2026

2127
outputs:
2228
src: ${{ steps.changes.outputs.src}}
@@ -47,10 +53,10 @@ jobs:
4753
name: NPM build
4854
steps:
4955
- name: Checkout
50-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
56+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5157

5258
- name: Read package.json node and npm engines version
53-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
59+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
5460
id: versions
5561
with:
5662
fallbackNode: '^20'
@@ -62,7 +68,7 @@ jobs:
6268
node-version: ${{ steps.versions.outputs.nodeVersion }}
6369

6470
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
65-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
71+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
6672

6773
- name: Install dependencies & build
6874
env:

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Npm audit fix and compile
710

@@ -24,12 +27,12 @@ jobs:
2427

2528
steps:
2629
- name: Checkout
27-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2831
with:
2932
ref: ${{ matrix.branches }}
3033

3134
- name: Read package.json node and npm engines version
32-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
35+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
3336
id: versions
3437
with:
3538
fallbackNode: '^20'
@@ -41,11 +44,11 @@ jobs:
4144
node-version: ${{ steps.versions.outputs.nodeVersion }}
4245

4346
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
44-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
47+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
4548

4649
- name: Fix npm audit
47-
run: |
48-
npm audit fix
50+
id: npm-audit
51+
uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0
4952

5053
- name: Run npm ci and npm run build
5154
if: always()
@@ -57,17 +60,16 @@ jobs:
5760
5861
- name: Create Pull Request
5962
if: always()
60-
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # v6.0.1
63+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
6164
with:
6265
token: ${{ secrets.COMMAND_BOT_PAT }}
63-
commit-message: "fix(deps): fix npm audit"
66+
commit-message: 'fix(deps): Fix npm audit'
6467
committer: GitHub <[email protected]>
6568
author: nextcloud-command <[email protected]>
6669
signoff: true
6770
branch: automated/noid/${{ matrix.branches }}-fix-npm-audit
68-
title: "[${{ matrix.branches }}] Fix npm audit"
69-
body: |
70-
Auto-generated fix of npm audit
71+
title: '[${{ matrix.branches }}] Fix npm audit'
72+
body: ${{ steps.npm-audit.outputs.markdown }}
7173
labels: |
7274
dependencies
7375
3. to review

0 commit comments

Comments
 (0)