Skip to content

Commit a5a267a

Browse files
committed
chore: update workflows from templates
Signed-off-by: John Molakvoæ <[email protected]>
1 parent b2ba270 commit a5a267a

File tree

10 files changed

+283
-174
lines changed

10 files changed

+283
-174
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
types: [published]
1111

1212
env:
13-
PHP_VERSION: 8.1
13+
PHP_VERSION: 8.2
1414

1515
jobs:
1616
build_and_publish:
@@ -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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
35+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

@@ -51,12 +51,12 @@ jobs:
5151
with:
5252
path: ${{ env.APP_NAME }}
5353
fallbackNode: '^20'
54-
fallbackNpm: '^9'
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@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
59+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
6060
with:
6161
node-version: ${{ steps.versions.outputs.nodeVersion }}
6262

@@ -66,7 +66,7 @@ jobs:
6666
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
6767

6868
- name: Set up php ${{ env.PHP_VERSION }}
69-
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
69+
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
7070
with:
7171
php-version: ${{ env.PHP_VERSION }}
7272
coverage: none
@@ -75,7 +75,7 @@ jobs:
7575

7676
- name: Check composer.json
7777
id: check_composer
78-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
78+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
7979
with:
8080
files: "${{ env.APP_NAME }}/composer.json"
8181

@@ -88,14 +88,16 @@ jobs:
8888
- name: Build ${{ env.APP_NAME }}
8989
# Skip if no package.json
9090
if: ${{ steps.versions.outputs.nodeVersion }}
91+
env:
92+
CYPRESS_INSTALL_BINARY: 0
9193
run: |
9294
cd ${{ env.APP_NAME }}
9395
npm ci
9496
npm run build
9597
9698
- name: Check Krankerl config
9799
id: krankerl
98-
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
100+
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
99101
with:
100102
files: ${{ env.APP_NAME }}/krankerl.toml
101103

@@ -126,7 +128,7 @@ jobs:
126128
unzip latest-$NCVERSION.zip
127129
128130
- name: Checkout server master fallback
129-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
131+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
130132
if: ${{ steps.server-checkout.outcome != 'success' }}
131133
with:
132134
submodules: true
@@ -149,7 +151,7 @@ jobs:
149151
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
150152
151153
- name: Attach tarball to github release
152-
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2
154+
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
153155
id: attach_to_release
154156
with:
155157
repo_token: ${{ secrets.GITHUB_TOKEN }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ concurrency:
2222
jobs:
2323
auto-approve-merge:
2424
if: github.actor == 'dependabot[bot]'
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-latest-low
2626
permissions:
2727
# for hmarr/auto-approve-action to approve PRs
2828
pull-requests: write

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55

66
name: Lint info.xml
77

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

1610
permissions:
1711
contents: read
@@ -22,18 +16,18 @@ concurrency:
2216

2317
jobs:
2418
xml-linters:
25-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest-low
2620

2721
name: info.xml lint
2822
steps:
2923
- name: Checkout
30-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
24+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3125

3226
- name: Download schema
3327
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
3428

3529
- name: Lint info.xml
36-
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1
30+
uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2
3731
with:
3832
xml-file: ./appinfo/info.xml
3933
xml-schema-file: ./info.xsd

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
25+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626

27-
- name: Set up php
28-
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
27+
- name: Set up php8.2
28+
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
2929
with:
30-
php-version: 8.1
30+
php-version: 8.2
31+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
3132
coverage: none
3233
ini-file: development
3334
env:

.github/workflows/lint-php.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55

66
name: Lint php
77

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

1610
permissions:
1711
contents: read
@@ -25,18 +19,19 @@ jobs:
2519
runs-on: ubuntu-latest
2620
strategy:
2721
matrix:
28-
php-versions: [ "8.0", "8.1", "8.2" ]
22+
php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
2923

3024
name: php-lint
3125

3226
steps:
3327
- name: Checkout
34-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
28+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3529

3630
- name: Set up php ${{ matrix.php-versions }}
37-
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
31+
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
3832
with:
3933
php-version: ${{ matrix.php-versions }}
34+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
4035
coverage: none
4136
ini-file: development
4237
env:
@@ -48,7 +43,7 @@ jobs:
4843
summary:
4944
permissions:
5045
contents: none
51-
runs-on: ubuntu-latest
46+
runs-on: ubuntu-latest-low
5247
needs: php-lint
5348

5449
if: always()

.github/workflows/node.yml

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,7 @@
55

66
name: Node
77

8-
on:
9-
pull_request:
10-
paths:
11-
- '.github/workflows/**'
12-
- 'src/**'
13-
- 'appinfo/info.xml'
14-
- 'package.json'
15-
- 'package-lock.json'
16-
- 'tsconfig.json'
17-
- '**.js'
18-
- '**.ts'
19-
- '**.vue'
20-
push:
21-
branches:
22-
- main
23-
- master
24-
- stable*
8+
on: pull_request
259

2610
permissions:
2711
contents: read
@@ -31,30 +15,59 @@ concurrency:
3115
cancel-in-progress: true
3216

3317
jobs:
18+
changes:
19+
runs-on: ubuntu-latest-low
20+
21+
outputs:
22+
src: ${{ steps.changes.outputs.src}}
23+
24+
steps:
25+
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
26+
id: changes
27+
continue-on-error: true
28+
with:
29+
filters: |
30+
src:
31+
- '.github/workflows/**'
32+
- 'src/**'
33+
- 'appinfo/info.xml'
34+
- 'package.json'
35+
- 'package-lock.json'
36+
- 'tsconfig.json'
37+
- '**.js'
38+
- '**.ts'
39+
- '**.vue'
40+
3441
build:
3542
runs-on: ubuntu-latest
3643

37-
name: node
44+
needs: changes
45+
if: needs.changes.outputs.src != 'false'
46+
47+
name: NPM build
3848
steps:
3949
- name: Checkout
40-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
50+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4151

4252
- name: Read package.json node and npm engines version
4353
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
4454
id: versions
4555
with:
4656
fallbackNode: '^20'
47-
fallbackNpm: '^9'
57+
fallbackNpm: '^10'
4858

4959
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
50-
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
60+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
5161
with:
5262
node-version: ${{ steps.versions.outputs.nodeVersion }}
5363

5464
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
5565
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
5666

5767
- name: Install dependencies & build
68+
env:
69+
CYPRESS_INSTALL_BINARY: 0
70+
PUPPETEER_SKIP_DOWNLOAD: true
5871
run: |
5972
npm ci
6073
npm run build --if-present
@@ -69,3 +82,18 @@ jobs:
6982
git status
7083
git --no-pager diff
7184
exit 1 # make it red to grab attention
85+
86+
summary:
87+
permissions:
88+
contents: none
89+
runs-on: ubuntu-latest-low
90+
needs: [changes, build]
91+
92+
if: always()
93+
94+
# This is the summary, we just avoid to rename it so that branch protection rules still match
95+
name: node
96+
97+
steps:
98+
- name: Summary status
99+
run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)