diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e39704f..fe88d3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,10 +2,9 @@ name: Release on: push: - branches: ["main"] + branches: ['main'] jobs: - preconditions: runs-on: ubuntu-latest outputs: @@ -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: @@ -109,7 +108,9 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 14.x + node-version: 16.x + - name: Use npm v8 + run: npm install -g npm@8 - name: Cache Node.js modules uses: actions/cache@v1 with: @@ -130,7 +131,9 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 14.x + node-version: 16.x + - name: Use npm v8 + run: npm install -g npm@8 - name: Cache Node.js modules uses: actions/cache@v1 with: @@ -151,7 +154,9 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 14.x + node-version: 16.x + - name: Use npm v8 + run: npm install -g npm@8 - name: Cache Node.js modules uses: actions/cache@v1 with: @@ -167,13 +172,13 @@ jobs: - name: Sleep uses: kibertoad/wait-action@1.0.1 with: - time: "30s" + time: '30s' - name: Initialise DB run: npx knex migrate:latest --env test - 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 }} @@ -197,7 +202,7 @@ jobs: echo "Skipping release as current version has already been published" publish: - name: "Publish package" + name: 'Publish package' needs: [preconditions, helm-lint, helm-test, lint, dependency-check, tests, check-version] runs-on: ubuntu-latest if: ${{ needs.check-version.outputs.is_new_version == 'true' }} @@ -214,7 +219,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: @@ -252,7 +257,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 }} @@ -268,11 +273,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 }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e4dd53..7d6bad4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: Lint and Test on: push: - branches-ignore: ["main"] + branches-ignore: ['main'] jobs: repo_ids: @@ -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: @@ -101,7 +101,9 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 14.x + node-version: 16.x + - name: Use npm v8 + run: npm install -g npm@8 - name: Cache Node.js modules uses: actions/cache@v1 with: @@ -121,7 +123,9 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 14.x + node-version: 16.x + - name: Use npm v8 + run: npm install -g npm@8 - name: Cache Node.js modules uses: actions/cache@v1 with: @@ -142,7 +146,9 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 14.x + node-version: 16.x + - name: Use npm v8 + run: npm install -g npm@8 - name: Cache Node.js modules uses: actions/cache@v1 with: @@ -165,7 +171,7 @@ jobs: run: npm run test check-version: - name: "Check version" + name: 'Check version' runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index 9ba4da0..6282310 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.0.0-experimental -FROM node:14.17.0-alpine AS build +FROM node:16-alpine AS build # Allow log level to be controlled. Uses an argument name that is different # from the existing environment variable, otherwise the environment variable @@ -14,14 +14,14 @@ RUN apk update && \ WORKDIR /vitalam-identity-service # Install base dependencies -RUN npm -g install npm@latest +RUN npm -g install npm@8.x.x COPY . . RUN npm ci --production ################################################################################################## -FROM node:14.17.0-alpine AS runtime +FROM node:16-alpine AS runtime WORKDIR /vitalam-identity-service diff --git a/helm/vitalam-identity-service/Chart.yaml b/helm/vitalam-identity-service/Chart.yaml index 1200961..aabede4 100644 --- a/helm/vitalam-identity-service/Chart.yaml +++ b/helm/vitalam-identity-service/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: vitalam-identity-service -appVersion: '0.0.3' +appVersion: '0.0.4' description: A Helm chart for vitalam-identity-service -version: '0.0.3' +version: '0.0.4' type: application maintainers: - name: digicatapult diff --git a/helm/vitalam-identity-service/values.yaml b/helm/vitalam-identity-service/values.yaml index 489a3a8..67c9abf 100644 --- a/helm/vitalam-identity-service/values.yaml +++ b/helm/vitalam-identity-service/values.yaml @@ -17,5 +17,5 @@ config: image: repository: ghcr.io/digicatapult/vitalam-identity-service pullPolicy: IfNotPresent - tag: 'v0.0.3' + tag: 'v0.0.4' pullSecrets: ['ghcr-digicatapult'] diff --git a/package-lock.json b/package-lock.json index 1223610..62c08e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@digicatapult/vitalam-identity-service", - "version": "0.0.3", + "version": "0.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@digicatapult/vitalam-identity-service", - "version": "0.0.3", + "version": "0.0.4", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "^5.9.1", @@ -43,7 +43,8 @@ "supertest": "^6.1.3" }, "engines": { - "node": ">=14.17.0" + "node": "16.x.x", + "npm": "8.x.x" } }, "node_modules/@babel/code-frame": { diff --git a/package.json b/package.json index b1852af..f0393ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@digicatapult/vitalam-identity-service", - "version": "0.0.3", + "version": "0.0.4", "description": "Identity Service for VITALam", "main": "app/index.js", "scripts": { @@ -16,7 +16,8 @@ "url": "git+https://github.com/digicatapult/vitalam-identity-service.git" }, "engines": { - "node": ">=14.17.0" + "node": "16.x.x", + "npm": "8.x.x" }, "keywords": [ "VITALam"