Skip to content

Commit 5bd9355

Browse files
committed
chore: update workflows from templates
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 96fa4d4 commit 5bd9355

File tree

6 files changed

+75
-34
lines changed

6 files changed

+75
-34
lines changed

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

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
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

811
on:
912
release:
1013
types: [published]
1114

12-
env:
13-
PHP_VERSION: 8.1
14-
1515
jobs:
1616
build_and_publish:
1717
runs-on: ubuntu-latest
@@ -32,7 +32,7 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

@@ -44,7 +44,7 @@ jobs:
4444
expression: "//info//dependencies//nextcloud/@min-version"
4545

4646
- name: Read package.json node and npm engines version
47-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
47+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4848
id: versions
4949
# Continue if no package.json
5050
continue-on-error: true
@@ -56,26 +56,32 @@ jobs:
5656
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5757
# Skip if no package.json
5858
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
59+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
6060
with:
6161
node-version: ${{ steps.versions.outputs.nodeVersion }}
6262

6363
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
6464
# Skip if no package.json
6565
if: ${{ steps.versions.outputs.npmVersion }}
66-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
66+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
67+
68+
- name: Get php version
69+
id: php-versions
70+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
71+
with:
72+
filename: ${{ env.APP_NAME }}/appinfo/info.xml
6773

68-
- name: Set up php ${{ env.PHP_VERSION }}
69-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
74+
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
75+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
7076
with:
71-
php-version: ${{ env.PHP_VERSION }}
77+
php-version: ${{ steps.php-versions.outputs.php-min }}
7278
coverage: none
7379
env:
7480
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7581

7682
- name: Check composer.json
7783
id: check_composer
78-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
84+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
7985
with:
8086
files: "${{ env.APP_NAME }}/composer.json"
8187

@@ -89,15 +95,15 @@ jobs:
8995
# Skip if no package.json
9096
if: ${{ steps.versions.outputs.nodeVersion }}
9197
env:
92-
CYPRESS_INSTALL_BINARY: 0
98+
NODE_ENV: production
9399
run: |
94100
cd ${{ env.APP_NAME }}
95101
npm ci
96-
npm run build
102+
npm run build --if-present
97103
98104
- name: Check Krankerl config
99105
id: krankerl
100-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
106+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
101107
with:
102108
files: ${{ env.APP_NAME }}/krankerl.toml
103109

@@ -123,12 +129,12 @@ jobs:
123129
continue-on-error: true
124130
id: server-checkout
125131
run: |
126-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
132+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
127133
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
128134
unzip latest-$NCVERSION.zip
129135
130136
- name: Checkout server master fallback
131-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
137+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
132138
if: ${{ steps.server-checkout.outcome != 'success' }}
133139
with:
134140
submodules: true
@@ -142,7 +148,7 @@ jobs:
142148
tar -xvf ${{ env.APP_NAME }}.tar.gz
143149
cd ../../../
144150
# Setting up keys
145-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
151+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
146152
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
147153
# Signing
148154
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 }}
@@ -151,7 +157,7 @@ jobs:
151157
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
152158
153159
- name: Attach tarball to github release
154-
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
160+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
155161
id: attach_to_release
156162
with:
157163
repo_token: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 5 additions & 2 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: Dependabot
710

@@ -21,14 +24,14 @@ concurrency:
2124

2225
jobs:
2326
auto-approve-merge:
24-
if: github.actor == 'dependabot[bot]'
27+
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
2528
runs-on: ubuntu-latest-low
2629
permissions:
2730
# for hmarr/auto-approve-action to approve PRs
2831
pull-requests: write
2932

3033
steps:
31-
# Github actions bot approve
34+
# GitHub actions bot approve
3235
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
3336
with:
3437
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/node.yml

Lines changed: 11 additions & 5 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,12 +20,15 @@ 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}}
2329

2430
steps:
25-
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
31+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
2632
id: changes
2733
continue-on-error: true
2834
with:
@@ -47,22 +53,22 @@ 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'
5763
fallbackNpm: '^10'
5864

5965
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
60-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
66+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
6167
with:
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/pr-feedback.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
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: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-FileCopyrightText: 2023 Marcel Klehr <mklehr@gmx.net>
8+
# SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com>
9+
# SPDX-FileCopyrightText: 2023 Daniel Kesselberg <mail@danielkesselberg.de>
10+
# SPDX-FileCopyrightText: 2023 Florian Steffens <florian.steffens@nextcloud.com>
11+
# SPDX-License-Identifier: MIT
12+
613
name: 'Ask for feedback on PRs'
714
on:
815
schedule:
@@ -17,18 +24,27 @@ jobs:
1724
id: scrape
1825
with:
1926
website: 'https://nextcloud.com/team/'
20-
- uses: marcelklehr/pr-feedback-action@601109aa729eb4c8d6d0ece7567b9d4901db4aef
27+
28+
- name: Get blocklist
29+
id: blocklist
30+
run: |
31+
blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -)
32+
echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT"
33+
34+
- uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4
2135
with:
2236
feedback-message: |
2337
Hello there,
24-
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
38+
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
2539
2640
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
2741
2842
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
2943
3044
Thank you for contributing to Nextcloud and we hope to hear from you soon!
45+
46+
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
3147
days-before-feedback: 14
32-
start-date: "2023-07-10"
33-
exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot"
48+
start-date: '2024-04-30'
49+
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot'
3450
exempt-bots: true

.github/workflows/psalm.yml

Lines changed: 11 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: 2022-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
58

69
name: Static analysis
710

@@ -18,12 +21,16 @@ jobs:
1821
name: static-psalm-analysis
1922
steps:
2023
- name: Checkout
21-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
24+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
25+
26+
- name: Get php version
27+
id: versions
28+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
2229

23-
- name: Set up php8.2
24-
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
30+
- name: Set up php${{ steps.versions.outputs.php-available }}
31+
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
2532
with:
26-
php-version: 8.2
33+
php-version: ${{ steps.versions.outputs.php-available }}
2734
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
2835
coverage: none
2936
ini-file: development

0 commit comments

Comments
 (0)