/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
.github/setup-node/action.yml
73 строки
3 KB
dependabot[bot]
Bump actions/setup-node from 6.4.0 to 7.0.0 in /.github/setup-node (#80963)
05 авг 2026, 04:56
Не верифицирован
05 авг 2026, 04:56
02fea5a
Код
Авторство
О чём код?
name: 'Setup Node.js and install npm dependencies' description: 'Configure Node.js and install npm dependencies while managing all aspects of caching.' inputs: node-version: description: 'Optional. The Node.js version to use. When not specified, the version specified in .nvmrc will be used.' required: false runs: using: 'composite' steps: - name: Use desired version of Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version-file: ${{ inputs.node-version == '' && '.nvmrc' || '' }} node-version: ${{ inputs.node-version }} check-latest: true # Caching for npm dependencies is automatically enabled when package.json contains devEngines.packageManager field set to npm # cache: npm cache-dependency-path: | package-lock.json patches/** - name: Pin npm version for consistency run: | npm install --global npm@10 npm --version shell: bash - name: Get Node.js and npm version id: node-version run: | echo "NODE_VERSION=$(node -v)" >> "$GITHUB_OUTPUT" echo "NPM_VERSION=$(npm -v)" >> "$GITHUB_OUTPUT" shell: bash - name: Cache node_modules id: cache-node_modules uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: # List workspace node_modules explicitly to support all kinds of layouts - hoisted and isolated. # A '**/node_modules' glob follows the isolated layout's symlinks and stalls the cache step. path: | node_modules packages/*/node_modules routes/*/node_modules storybook/node_modules test/*/node_modules tools/*/node_modules widgets/*/node_modules key: node_modules-${{ runner.os }}-${{ runner.arch }}-${{ steps.node-version.outputs.NODE_VERSION }}-npm-${{ steps.node-version.outputs.NPM_VERSION }}-${{ hashFiles('package-lock.json', 'patches/**') }} - name: Install npm dependencies if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }} run: | npm ci shell: bash - name: Upload npm logs as an artifact on failure uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: failure() with: name: npm-logs path: C:\npm\cache\_logs # On cache hit, we run the post-install script to match the native `npm ci` behavior. # An example of this is to patch `node_modules` using patch-package. - name: Post-install if: ${{ steps.cache-node_modules.outputs.cache-hit == 'true' }} run: | # Run the post-install script for the root project. npm run postinstall # Run the post-install scripts for workspaces. npx lerna run postinstall shell: bash