diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5438dd88db..06cf1c7596 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,7 @@ on: branches: - main jobs: - build-lint: + build_lint: name: Build and lint runs-on: ubuntu-latest steps: @@ -13,20 +13,28 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.6.1 - - name: Setup build cache - uses: actions/cache@v2 + node-version: 16.18.0 + - name: Cache mode modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules with: + # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: ${{ runner.os }}-node- - - name: Install dependencies + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles("**/package-lock.json") }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install Dependencies + if: steps.cache-node-modules.outputs.cache-hit != "true" run: npm ci - name: Compile TypeScript run: npm run compile - name: Run linter run: npm run lint - build-docker: + build_docker: name: Build Docker image runs-on: ubuntu-latest steps: @@ -41,5 +49,5 @@ jobs: - 'Dockerfile' - 'package*.json' - name: Build Docker image - if: steps.filter.outputs.build == 'true' + if: steps.filter.outputs.build == "true" run: docker build . diff --git a/.node-version b/.node-version index d9216d9a90..94f5f26dcb 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -16.6.1 +16.18.0 diff --git a/Dockerfile b/Dockerfile index 0f08dee810..cce71f6dfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.6.1-alpine3.13 AS builder +FROM node:16.18.0-alpine3.16 AS builder LABEL org.opencontainers.image.source="https://github.com/jef/streetmerchant" @@ -16,7 +16,7 @@ COPY test/ test/ RUN npm run compile RUN npm prune --production -FROM node:16.6.1-alpine3.13 +FROM node:16.18.0-alpine3.16 RUN apk add --no-cache chromium diff --git a/package.json b/package.json index 3e59e28695..5398ad4937 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,6 @@ "webpack": "^5.50.0" }, "volta": { - "node": "16.6.1" + "node": "16.18.0" } }