Skip to content

Commit

Permalink
Merge pull request #349 from nextcloud/ci/build/use-node-npm-from-eng…
Browse files Browse the repository at this point in the history
…ines

ci(build): install node and npm according to engines spec
  • Loading branch information
st3iny authored Jan 6, 2025
2 parents 37ee001 + 76dbd04 commit 5654b1f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ jobs:
node:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

name: node${{ matrix.node-version }}
name: Build
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up node ${{ matrix.node-version }}
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'

- name: Install dependencies
run: npm ci
Expand Down
6 changes: 6 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ path = ["renovate.json"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2024 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "MIT"

[[annotations]]
path = ["CHANGELOG.md"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2022 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "MIT"

0 comments on commit 5654b1f

Please sign in to comment.