Skip to content

Commit c27beb9

Browse files
skjnldsvst3iny
authored andcommitted
chore: update workflows from templates
Signed-off-by: skjnldsv <skjnldsv@protonmail.com> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
1 parent 186a6d9 commit c27beb9

File tree

10 files changed

+191
-72
lines changed

10 files changed

+191
-72
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
35+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

@@ -134,7 +134,7 @@ jobs:
134134
unzip latest-$NCVERSION.zip
135135
136136
- name: Checkout server master fallback
137-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
137+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
138138
if: ${{ steps.server-checkout.outcome != 'success' }}
139139
with:
140140
submodules: true

.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,8 +24,8 @@ concurrency:
2124

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

.github/workflows/fixup.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: Block fixup and squash commits
710

@@ -24,10 +27,10 @@ jobs:
2427
pull-requests: write
2528
name: Block fixup and squash commits
2629

27-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-latest-low
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: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,12 @@
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

11-
on:
12-
pull_request:
13-
paths:
14-
- '.github/workflows/**'
15-
- 'src/**'
16-
- 'appinfo/info.xml'
17-
- 'package.json'
18-
- 'package-lock.json'
19-
- 'tsconfig.json'
20-
- '.eslintrc.*'
21-
- '.eslintignore'
22-
- '**.js'
23-
- '**.ts'
24-
- '**.vue'
11+
on: pull_request
2512

2613
permissions:
2714
contents: read
@@ -31,32 +18,78 @@ concurrency:
3118
cancel-in-progress: true
3219

3320
jobs:
21+
changes:
22+
runs-on: ubuntu-latest-low
23+
24+
outputs:
25+
src: ${{ steps.changes.outputs.src}}
26+
27+
steps:
28+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
29+
id: changes
30+
continue-on-error: true
31+
with:
32+
filters: |
33+
src:
34+
- '.github/workflows/**'
35+
- 'src/**'
36+
- 'appinfo/info.xml'
37+
- 'package.json'
38+
- 'package-lock.json'
39+
- 'tsconfig.json'
40+
- '.eslintrc.*'
41+
- '.eslintignore'
42+
- '**.js'
43+
- '**.ts'
44+
- '**.vue'
45+
3446
lint:
3547
runs-on: ubuntu-latest
3648

37-
name: eslint
49+
needs: changes
50+
if: needs.changes.outputs.src != 'false'
51+
52+
name: NPM lint
3853

3954
steps:
4055
- name: Checkout
41-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
56+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
4257

4358
- name: Read package.json node and npm engines version
44-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
59+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
4560
id: versions
4661
with:
47-
fallbackNode: '^16'
48-
fallbackNpm: '^7'
62+
fallbackNode: '^20'
63+
fallbackNpm: '^10'
4964

5065
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
51-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
66+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
5267
with:
5368
node-version: ${{ steps.versions.outputs.nodeVersion }}
5469

5570
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
5671
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
5772

5873
- name: Install dependencies
74+
env:
75+
CYPRESS_INSTALL_BINARY: 0
76+
PUPPETEER_SKIP_DOWNLOAD: true
5977
run: npm ci
6078

6179
- name: Lint
6280
run: npm run lint
81+
82+
summary:
83+
permissions:
84+
contents: none
85+
runs-on: ubuntu-latest-low
86+
needs: [changes, lint]
87+
88+
if: always()
89+
90+
# This is the summary, we just avoid to rename it so that branch protection rules still match
91+
name: eslint
92+
93+
steps:
94+
- name: Summary status
95+
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +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 info.xml
710

8-
on:
9-
pull_request:
10-
push:
11-
branches:
12-
- main
13-
- master
14-
- stable*
11+
on: pull_request
1512

1613
permissions:
1714
contents: read
@@ -22,18 +19,18 @@ concurrency:
2219

2320
jobs:
2421
xml-linters:
25-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-latest-low
2623

2724
name: info.xml lint
2825
steps:
2926
- name: Checkout
30-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
27+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3128

3229
- name: Download schema
3330
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
3431

3532
- name: Lint info.xml
36-
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
33+
uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2
3734
with:
3835
xml-file: ./appinfo/info.xml
3936
xml-schema-file: ./info.xsd

.github/workflows/lint-php-cs.yml

Lines changed: 12 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-cs
710

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

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
28+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
29+
30+
- name: Get php version
31+
id: versions
32+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
2633

27-
- name: Set up php
28-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
34+
- name: Set up php${{ steps.versions.outputs.php-available }}
35+
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # v2
2936
with:
30-
php-version: 8.1
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
3139
coverage: none
3240
ini-file: development
3341
env:

.github/workflows/lint-php.yml

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

8-
on:
9-
pull_request:
10-
push:
11-
branches:
12-
- main
13-
- master
14-
- stable*
11+
on: pull_request
1512

1613
permissions:
1714
contents: read
@@ -21,22 +18,35 @@ concurrency:
2118
cancel-in-progress: true
2219

2320
jobs:
21+
matrix:
22+
runs-on: ubuntu-latest-low
23+
outputs:
24+
php-versions: ${{ steps.versions.outputs.php-versions }}
25+
steps:
26+
- name: Checkout app
27+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
28+
- name: Get version matrix
29+
id: versions
30+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
31+
2432
php-lint:
2533
runs-on: ubuntu-latest
34+
needs: matrix
2635
strategy:
2736
matrix:
28-
php-versions: [ "8.0", "8.1", "8.2", "8.3"]
37+
php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
2938

3039
name: php-lint
3140

3241
steps:
3342
- name: Checkout
34-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
43+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
3544

3645
- name: Set up php ${{ matrix.php-versions }}
37-
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
46+
uses: shivammathur/setup-php@c665c7a15b5295c2488ac8a87af9cb806cd72198 # v2
3847
with:
3948
php-version: ${{ matrix.php-versions }}
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
4050
coverage: none
4151
ini-file: development
4252
env:
@@ -48,7 +58,7 @@ jobs:
4858
summary:
4959
permissions:
5060
contents: none
51-
runs-on: ubuntu-latest
61+
runs-on: ubuntu-latest-low
5262
needs: php-lint
5363

5464
if: always()

.github/workflows/lint-stylelint.yml

Lines changed: 10 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: Lint stylelint
710

@@ -22,24 +25,26 @@ jobs:
2225

2326
steps:
2427
- name: Checkout
25-
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
28+
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
2629

2730
- name: Read package.json node and npm engines version
28-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
31+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
2932
id: versions
3033
with:
31-
fallbackNode: '^16'
32-
fallbackNpm: '^7'
34+
fallbackNode: '^20'
35+
fallbackNpm: '^10'
3336

3437
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
35-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
38+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
3639
with:
3740
node-version: ${{ steps.versions.outputs.nodeVersion }}
3841

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

4245
- name: Install dependencies
46+
env:
47+
CYPRESS_INSTALL_BINARY: 0
4348
run: npm ci
4449

4550
- name: Lint

0 commit comments

Comments
 (0)