Skip to content

Commit 95ae0a3

Browse files
committed
chore: update workflows from templates
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent a8ac710 commit 95ae0a3

File tree

7 files changed

+94
-92
lines changed

7 files changed

+94
-92
lines changed

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

Lines changed: 28 additions & 20 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
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Check actor permission
24-
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
24+
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0
2525
with:
2626
require: write
2727

@@ -32,7 +32,7 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
35+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

@@ -44,38 +44,44 @@ 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@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
47+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4848
id: versions
4949
# Continue if no package.json
5050
continue-on-error: true
5151
with:
5252
path: ${{ env.APP_NAME }}
53-
fallbackNode: "^16"
54-
fallbackNpm: "^7"
53+
fallbackNode: '^20'
54+
fallbackNpm: '^10'
5555

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@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
59+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
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@v2
74+
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
75+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
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@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
84+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
7985
with:
8086
files: "${{ env.APP_NAME }}/composer.json"
8187

@@ -88,14 +94,16 @@ jobs:
8894
- name: Build ${{ env.APP_NAME }}
8995
# Skip if no package.json
9096
if: ${{ steps.versions.outputs.nodeVersion }}
97+
env:
98+
CYPRESS_INSTALL_BINARY: 0
9199
run: |
92100
cd ${{ env.APP_NAME }}
93101
npm ci
94-
npm run build
102+
npm run build --if-present
95103
96104
- name: Check Krankerl config
97105
id: krankerl
98-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
106+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
99107
with:
100108
files: ${{ env.APP_NAME }}/krankerl.toml
101109

@@ -121,12 +129,12 @@ jobs:
121129
continue-on-error: true
122130
id: server-checkout
123131
run: |
124-
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
132+
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
125133
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
126134
unzip latest-$NCVERSION.zip
127135
128136
- name: Checkout server master fallback
129-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
137+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
130138
if: ${{ steps.server-checkout.outcome != 'success' }}
131139
with:
132140
submodules: true
@@ -140,7 +148,7 @@ jobs:
140148
tar -xvf ${{ env.APP_NAME }}.tar.gz
141149
cd ../../../
142150
# Setting up keys
143-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
151+
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
144152
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
145153
# Signing
146154
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 }}
@@ -149,7 +157,7 @@ jobs:
149157
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
150158
151159
- name: Attach tarball to github release
152-
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2
160+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
153161
id: attach_to_release
154162
with:
155163
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-eslint.yml

Lines changed: 9 additions & 6 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,22 +56,22 @@ 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'
6366
fallbackNpm: '^10'
6467

6568
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
66-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
69+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
6770
with:
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-php-cs.yml

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

8-
on:
9-
push:
10-
branches: [ main, test ]
11-
paths:
12-
- 'lib/**'
13-
- 'templates/**'
14-
- 'tests/**'
15-
- 'vendor/**'
16-
- 'vendor-bin/**'
17-
- composer.lock
18-
- composer.json
19-
pull_request:
20-
paths:
21-
- 'lib/**'
22-
- 'templates/**'
23-
- 'tests/**'
24-
- 'vendor/**'
25-
- 'vendor-bin/**'
26-
- composer.lock
27-
- composer.json
11+
on: pull_request
2812

2913
permissions:
3014
contents: read
@@ -41,12 +25,17 @@ jobs:
4125

4226
steps:
4327
- name: Checkout
44-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
29+
30+
- name: Get php version
31+
id: versions
32+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
4533

46-
- name: Set up php
47-
uses: shivammathur/setup-php@v2
34+
- name: Set up php${{ steps.versions.outputs.php-available }}
35+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
4836
with:
49-
php-version: 8.2
37+
php-version: ${{ steps.versions.outputs.php-available }}
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
5039
coverage: none
5140
ini-file: development
5241
env:

.github/workflows/node.yml

Lines changed: 10 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: 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,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@60edb5dd545a775178f52524783378180af0d1f8 # v3
66+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
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/openapi.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-FileCopyrightText: 2024 Arthur Schiwon <blizzz@arthur-schiwon.de>
8+
# SPDX-License-Identifier: MIT
9+
110
name: OpenAPI
211

312
on: pull_request
@@ -17,16 +26,16 @@ jobs:
1726

1827
steps:
1928
- name: Checkout
20-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
29+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2130

2231
- name: Get php version
23-
id: versions
32+
id: php_versions
2433
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
2534

2635
- name: Set up php
27-
uses: shivammathur/setup-php@v2
36+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
2837
with:
29-
php-version: ${{ steps.versions.outputs.php-available }}
38+
php-version: ${{ steps.php_versions.outputs.php-available }}
3039
extensions: xml
3140
coverage: none
3241
ini-file: development
@@ -41,7 +50,7 @@ jobs:
4150

4251
- name: Read package.json node and npm engines version
4352
if: steps.check_typescript_openapi.outputs.files_exists == 'true'
44-
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
53+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4554
id: node_versions
4655
# Continue if no package.json
4756
continue-on-error: true
@@ -51,13 +60,13 @@ jobs:
5160

5261
- name: Set up node ${{ steps.node_versions.outputs.nodeVersion }}
5362
if: ${{ steps.node_versions.outputs.nodeVersion }}
54-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
63+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
5564
with:
5665
node-version: ${{ steps.node_versions.outputs.nodeVersion }}
5766

5867
- name: Set up npm ${{ steps.node_versions.outputs.npmVersion }}
5968
if: ${{ steps.node_versions.outputs.nodeVersion }}
60-
run: npm i -g npm@"${{ steps.node_versions.outputs.npmVersion }}"
69+
run: npm i -g 'npm@${{ steps.node_versions.outputs.npmVersion }}'
6170

6271
- name: Install dependencies & build
6372
if: ${{ steps.node_versions.outputs.nodeVersion }}

.github/workflows/pr-feedback.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ jobs:
4545
4646
(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).)
4747
days-before-feedback: 14
48-
start-date: "2023-07-10"
49-
exempt-authors: "${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot"
48+
start-date: '2024-04-30'
49+
exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
5050
exempt-bots: true

0 commit comments

Comments
 (0)