Skip to content

Commit

Permalink
update and pin node version (#11)
Browse files Browse the repository at this point in the history
* update and pin node version

* pin npm
  • Loading branch information
danielcooperxyz authored Feb 2, 2022
1 parent c46497e commit fb14ad9
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 24 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Release

on:
push:
branches: ["main"]
branches: ['main']

jobs:

preconditions:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -66,7 +65,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
buildkitd-flags: '--debug'
- name: Set up Helm
uses: azure/setup-helm@v1
with:
Expand Down Expand Up @@ -110,6 +109,8 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
- name: Cache Node.js modules
uses: actions/cache@v1
with:
Expand All @@ -131,6 +132,8 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
- name: Cache Node.js modules
uses: actions/cache@v1
with:
Expand All @@ -152,6 +155,8 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
- name: Cache Node.js modules
uses: actions/cache@v1
with:
Expand All @@ -167,11 +172,11 @@ jobs:
- name: Sleep
uses: kibertoad/[email protected]
with:
time: "30s"
time: '30s'
- name: Run tests
run: npm run test
check-version:
name: "Check version"
name: 'Check version'
runs-on: ubuntu-latest
outputs:
is_new_version: ${{ steps.get_version.outputs.IS_NEW_VERSION }}
Expand All @@ -195,7 +200,7 @@ jobs:
echo "Skipping release as current version has already been published"
publish:
name: "Publish package"
name: 'Publish package'
needs:
- preconditions
- helm-lint
Expand All @@ -219,7 +224,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
buildkitd-flags: '--debug'
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -258,7 +263,7 @@ jobs:
- name: Build release version
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
token: '${{ secrets.GITHUB_TOKEN }}'
tag_name: ${{ needs.check-version.outputs.version }}
prerelease: false
name: ${{ needs.check-version.outputs.version }}
Expand All @@ -274,11 +279,11 @@ jobs:
}
catch (err) {
if (err.status !== 422) throw err
}
}
- name: Build release latest
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
token: '${{ secrets.GITHUB_TOKEN }}'
tag_name: latest
prerelease: false
name: Latest ${{ needs.check-version.outputs.version }}
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lint and Test

on:
push:
branches-ignore: ["main"]
branches-ignore: ['main']

jobs:
repo_ids:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
buildkitd-flags: '--debug'
- name: Set up Helm
uses: azure/setup-helm@v1
with:
Expand Down Expand Up @@ -102,6 +102,8 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
- name: Cache Node.js modules
uses: actions/cache@v1
with:
Expand All @@ -122,6 +124,8 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
- name: Cache Node.js modules
uses: actions/cache@v1
with:
Expand All @@ -143,6 +147,8 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: 16.x
- name: Use npm v8
run: npm install -g npm@8
- name: Cache Node.js modules
uses: actions/cache@v1
with:
Expand All @@ -163,7 +169,7 @@ jobs:
run: npm run test

check-version:
name: "Check version"
name: 'Check version'
runs-on: ubuntu-latest

steps:
Expand Down
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.3-labs

ARG IPFS_BUILD_IMAGE_VERSION=1.17-alpine3.15
ARG NODE_RUNTIME_IMAGE_VERSION=16.13.2-alpine
ARG NODE_RUNTIME_IMAGE_VERSION=16-alpine
FROM golang:$IPFS_BUILD_IMAGE_VERSION AS ipfs_build

ENV SRC_DIR /go/src/github.com/ipfs/go-ipfs
Expand All @@ -22,7 +22,7 @@ rm -rf $SRC_DIR
EOF

FROM node:$NODE_RUNTIME_IMAGE_VERSION AS runtime
RUN npm i -g npm@latest
RUN npm i -g npm@8.x.x

ARG LOGLEVEL
ENV NPM_CONFIG_LOGLEVEL ${LOGLEVEL}
Expand Down
4 changes: 2 additions & 2 deletions helm/vitalam-ipfs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: vitalam-ipfs
appVersion: '1.2.1'
appVersion: '1.2.2'
description: A Helm chart for vitalam-ipfs
version: '1.2.1'
version: '1.2.2'
type: application
dependencies:
- name: vitalam-node
Expand Down
2 changes: 1 addition & 1 deletion helm/vitalam-ipfs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ config:
image:
repository: ghcr.io/digicatapult/vitalam-ipfs
pullPolicy: IfNotPresent
tag: 'v1.2.1'
tag: 'v1.2.2'

storage:
storageClass: ""
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digicatapult/vitalam-ipfs",
"version": "1.2.1",
"version": "1.2.2",
"description": "Service for WASP",
"main": "app/index.js",
"scripts": {
Expand All @@ -18,7 +18,8 @@
"url": "git+https://github.com/digicatapult/vitalam-ipfs.git"
},
"engines": {
"node": ">=16.13.2"
"node": "16.x.x",
"npm": "8.x.x"
},
"keywords": [
"WASP"
Expand Down

0 comments on commit fb14ad9

Please sign in to comment.