Skip to content

Commit

Permalink
setup node using the .node-version file
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Mar 20, 2023
1 parent 77ecf89 commit 2088fb2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ jobs:
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0

- name: Setup Node.js 18.x
# check the node version from the .node-version file
- name: fetch node version
id: node-version
run: |
version=$(cat .node-version)
echo "version=${version}" >> $GITHUB_OUTPUT
- name: setup node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
with:
node-version: 18.x
node-version: ${{ steps.node-version.outputs.version }}
cache: 'npm'

- name: install dependencies
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/package-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ jobs:
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0

- name: Setup Node.js 18.x
# check the node version from the .node-version file
- name: fetch node version
id: node-version
run: |
version=$(cat .node-version)
echo "version=${version}" >> $GITHUB_OUTPUT
- name: setup node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
with:
node-version: 18.x
node-version: ${{ steps.node-version.outputs.version }}
cache: 'npm'

- name: install dependencies
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ jobs:
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0

- name: Setup Node.js 18.x
# check the node version from the .node-version file
- name: fetch node version
id: node-version
run: |
version=$(cat .node-version)
echo "version=${version}" >> $GITHUB_OUTPUT
- name: setup node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
with:
node-version: 18.x
node-version: ${{ steps.node-version.outputs.version }}
cache: 'npm'

- name: install dependencies
Expand Down

0 comments on commit 2088fb2

Please sign in to comment.