Node Version CI Update (#19978)
* updates github workflows to read node version from .nvmrc file * updates to double quotes for shell expression * removes set-output workflow command * updates to use node-version-file option for gh workflows * pins node version to 16
This commit is contained in:
parent
4564a3534b
commit
7fe9a2b328
|
@ -47,7 +47,7 @@ jobs:
|
|||
- name: Set up node and yarn
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: './ui/package.json'
|
||||
cache: yarn
|
||||
cache-dependency-path: ui/yarn.lock
|
||||
- name: Build UI
|
||||
|
|
|
@ -204,14 +204,14 @@ jobs:
|
|||
# Setup node.js without caching to allow running npm install -g yarn (next step)
|
||||
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: './ui/package.json'
|
||||
- id: install-yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
# Setup node.js with caching using the yarn.lock file
|
||||
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: './ui/package.json'
|
||||
cache: yarn
|
||||
cache-dependency-path: ui/yarn.lock
|
||||
- id: install-browser-libraries
|
||||
|
|
|
@ -32,8 +32,6 @@ jobs:
|
|||
name: Get metadata
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
go-version: ${{ steps.get-metadata.outputs.go-version }}
|
||||
node-version: ${{ steps.get-metadata.outputs.node-version }}
|
||||
runs-on: ${{ steps.get-metadata.outputs.runs-on }}
|
||||
vault_edition: ${{ steps.get-metadata.outputs.vault_edition }}
|
||||
steps:
|
||||
|
@ -42,8 +40,6 @@ jobs:
|
|||
env:
|
||||
IS_ENT: ${{ startsWith(github.event.repository.name, 'vault-enterprise' ) }}
|
||||
run: |
|
||||
echo "go-version=$(cat ./.go-version)" >> "$GITHUB_OUTPUT"
|
||||
echo "node-version=$(cat ./ui/.nvmrc)" >> "$GITHUB_OUTPUT"
|
||||
if [ "$IS_ENT" == true ]; then
|
||||
echo "detected vault_edition=ent"
|
||||
echo "runs-on=['self-hosted', 'ondemand', 'os=linux', 'type=m5d.4xlarge']" >> "$GITHUB_OUTPUT"
|
||||
|
@ -75,7 +71,7 @@ jobs:
|
|||
- name: Set Up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ needs.get-metadata.outputs.go-version }}
|
||||
go-version-file: ./.go-version
|
||||
- uses: hashicorp/action-setup-enos@v1
|
||||
with:
|
||||
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||
|
@ -84,7 +80,7 @@ jobs:
|
|||
- name: Set Up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ needs.get-metadata.outputs.node-version }}
|
||||
node-version-file: './ui/package.json'
|
||||
- name: Set Up Terraform
|
||||
uses: hashicorp/setup-terraform@v2
|
||||
with:
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
"@hashicorp/ember-flight-icons": "2.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
"node": "16"
|
||||
},
|
||||
"ember": {
|
||||
"edition": "octane"
|
||||
|
|
Loading…
Reference in New Issue