11# This workflow is provided via the organization template repository
22#
3- # https://github.com/nextcloud/.github
3+ # https://github.com/nextcloud-libraries /.github
44# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55#
66# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -24,77 +24,34 @@ concurrency:
2424 cancel-in-progress : true
2525
2626jobs :
27- changes :
28- runs-on : ubuntu-latest
29- permissions :
30- contents : read
31- pull-requests : read
32-
33- outputs :
34- src : ${{ steps.changes.outputs.src}}
35-
36- steps :
37- - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
38- id : changes
39- continue-on-error : true
40- with :
41- filters : |
42- src:
43- - '.github/workflows/lint-typescript.yml'
44- - 'package.json'
45- - 'package-lock.json'
46- - 'tsconfig.json'
47- - '**.ts'
48- - '**.vue'
49-
5027 test :
5128 runs-on : ubuntu-latest
52-
53- needs : changes
54- if : needs.changes.outputs.src != 'false'
29+ name : Lint Typescript
5530
5631 steps :
5732 - name : Checkout
58- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5934 with :
6035 persist-credentials : false
6136
62- - name : Read package.json node and npm engines version
63- uses : skjnldsv/read -package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
37+ - name : Read package.json
38+ uses : nextcloud-libraries/parse -package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
6439 id : versions
65- with :
66- fallbackNode : ' ^20'
67- fallbackNpm : ' ^10'
6840
69- - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
70- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
41+ - name : Set up node
42+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0 .0
7143 with :
72- node-version : ${{ steps.versions.outputs.nodeVersion }}
44+ node-version : ${{ steps.versions.outputs.node-version }}
7345
74- - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
75- run : npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
46+ - name : Set up npm
47+ run : npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
7648
7749 - name : Install dependencies
7850 env :
7951 CYPRESS_INSTALL_BINARY : 0
80- run : |
81- npm ci
52+ run : npm ci
8253
8354 - name : Check types
8455 run : |
8556 npm run --if-present check-types
8657 npm run --if-present ts:check
87-
88- summary :
89- permissions :
90- contents : none
91- runs-on : ubuntu-latest
92- needs : [changes, test]
93-
94- if : always()
95-
96- name : typescript-summary
97-
98- steps :
99- - name : Summary status
100- run : if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
0 commit comments