Skip to content

Commit 9b0b4d1

Browse files
committed
chore: bump node, implement proper ci cache
1 parent 87301fe commit 9b0b4d1

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

Diff for: .github/workflows/ci.yaml

+17-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- main
66
jobs:
7-
build-lint:
7+
build_lint:
88
name: Build and lint
99
runs-on: ubuntu-latest
1010
steps:
@@ -13,20 +13,28 @@ jobs:
1313
- name: Setup Node.js
1414
uses: actions/setup-node@v3
1515
with:
16-
node-version: 16.6.1
17-
- name: Setup build cache
18-
uses: actions/cache@v2
16+
node-version: 16.18.0
17+
- name: Cache mode modules
18+
id: cache-npm
19+
uses: actions/cache@v3
20+
env:
21+
cache-name: cache-node-modules
1922
with:
23+
# npm cache files are stored in `~/.npm` on Linux/macOS
2024
path: ~/.npm
21-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22-
restore-keys: ${{ runner.os }}-node-
23-
- name: Install dependencies
25+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles("**/package-lock.json") }}
26+
restore-keys: |
27+
${{ runner.os }}-build-${{ env.cache-name }}-
28+
${{ runner.os }}-build-
29+
${{ runner.os }}-
30+
- name: Install Dependencies
31+
if: steps.cache-node-modules.outputs.cache-hit != "true"
2432
run: npm ci
2533
- name: Compile TypeScript
2634
run: npm run compile
2735
- name: Run linter
2836
run: npm run lint
29-
build-docker:
37+
build_docker:
3038
name: Build Docker image
3139
runs-on: ubuntu-latest
3240
steps:
@@ -41,5 +49,5 @@ jobs:
4149
- 'Dockerfile'
4250
- 'package*.json'
4351
- name: Build Docker image
44-
if: steps.filter.outputs.build == 'true'
52+
if: steps.filter.outputs.build == "true"
4553
run: docker build .

Diff for: .node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.6.1
1+
16.18.0

Diff for: Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16.6.1-alpine3.13 AS builder
1+
FROM node:16.18.0-alpine3.16 AS builder
22

33
LABEL org.opencontainers.image.source="https://github.com/jef/streetmerchant"
44

@@ -16,7 +16,7 @@ COPY test/ test/
1616
RUN npm run compile
1717
RUN npm prune --production
1818

19-
FROM node:16.6.1-alpine3.13
19+
FROM node:16.18.0-alpine3.16
2020

2121
RUN apk add --no-cache chromium
2222

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@
8585
"webpack": "^5.50.0"
8686
},
8787
"volta": {
88-
"node": "16.6.1"
88+
"node": "16.18.0"
8989
}
9090
}

0 commit comments

Comments
 (0)