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
@@ -31,9 +31,6 @@ permissions:
3131jobs :
3232 init :
3333 runs-on : ubuntu-latest
34- outputs :
35- nodeVersion : ${{ steps.versions.outputs.nodeVersion }}
36- npmVersion : ${{ steps.versions.outputs.npmVersion }}
3734
3835 env :
3936 PUPPETEER_SKIP_DOWNLOAD : true
@@ -54,34 +51,31 @@ jobs:
5451 id : check_composer
5552 uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
5653 with :
57- files : " composer.json"
54+ files : ' composer.json'
5855
5956 - name : Install composer dependencies
6057 if : steps.check_composer.outputs.files_exists == 'true'
6158 run : composer install --no-dev
6259
63- - name : Read package.json node and npm engines version
64- uses : skjnldsv/read -package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
60+ - name : Read package.json
61+ uses : nextcloud-libraries/parse -package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
6562 id : versions
66- with :
67- fallbackNode : " ^20"
68- fallbackNpm : " ^10"
6963
70- - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
64+ - name : Set up node
7165 uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
7266 with :
73- node-version : ${{ steps.versions.outputs.nodeVersion }}
67+ node-version : ${{ steps.versions.outputs.node-version }}
7468
75- - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
76- run : npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
69+ - name : Set up npm
70+ run : npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
7771
7872 - name : Install node dependencies & build app
7973 run : |
8074 npm ci
8175 TESTING=true npm run build --if-present
8276
8377 - name : Save context
84- uses : buildjet/cache/save@v4
78+ uses : buildjet/cache/save@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
8579 with :
8680 key : cypress-context-${{ github.run_id }}
8781 path : ./
@@ -101,22 +95,26 @@ jobs:
10195
10296 steps :
10397 - name : Restore context
104- uses : buildjet/cache/restore@v4
98+ uses : buildjet/cache/restore@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
10599 with :
106100 fail-on-cache-miss : true
107101 key : cypress-context-${{ github.run_id }}
108102 path : ./
109103
110- - name : Set up node ${{ needs.init.outputs.nodeVersion }}
104+ - name : Read package.json
105+ uses : nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
106+ id : versions
107+
108+ - name : Set up node
111109 uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
112110 with :
113- node-version : ${{ needs.init .outputs.nodeVersion }}
111+ node-version : ${{ steps.versions .outputs.node-version }}
114112
115- - name : Set up npm ${{ needs.init.outputs.npmVersion }}
116- run : npm i -g 'npm@${{ needs.init .outputs.npmVersion }}'
113+ - name : Set up npm
114+ run : npm i -g 'npm@${{ steps.versions .outputs.package-manager-version }}'
117115
118116 - name : Run ${{ startsWith(matrix.containers, 'component') && 'component' || 'E2E' }} cypress tests
119- uses : cypress-io/github-action@e65cba2e7319696fc0fdc4d5a319b737aec4ba1c # v6.10.3
117+ uses : cypress-io/github-action@7ef72e250a9e564efb4ed4c2433971ada4cc38b4 # v6.10.4
120118 with :
121119 record : ${{ secrets.CYPRESS_RECORD_KEY && true }}
122120 parallel : ${{ secrets.CYPRESS_RECORD_KEY && true }}
0 commit comments