55
66name : 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
2610permissions :
2711 contents : read
@@ -31,30 +15,59 @@ concurrency:
3115 cancel-in-progress : true
3216
3317jobs :
18+ changes :
19+ runs-on : ubuntu-latest
20+
21+ outputs :
22+ src : ${{ steps.changes.outputs.src}}
23+
24+ steps :
25+ - uses : dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
50+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4151
4252 - name : Read package.json node and npm engines version
43- uses : skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
53+ uses : skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
4454 id : versions
4555 with :
46- fallbackNode : ' ^16 '
47- fallbackNpm : ' ^7 '
56+ fallbackNode : ' ^20 '
57+ fallbackNpm : ' ^9 '
4858
4959 - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
50- uses : actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
60+ uses : actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # 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
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
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