Skip to content

Commit f429c3c

Browse files
committed
chore: bump to node.js to v14.3.0
1 parent e6c33c9 commit f429c3c

File tree

5 files changed

+69
-2
lines changed

5 files changed

+69
-2
lines changed

.github/workflows/build.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: build-master
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Read .nvmrc
18+
id: nvmrc
19+
uses: pCYSl5EDgo/cat@master
20+
with:
21+
path: ./.nvmrc
22+
trim: true
23+
24+
- name: Set Env Variables
25+
id: set-env
26+
uses: allenevans/[email protected]
27+
with:
28+
overwrite: false
29+
DOCKER_REGISTRY: "docker.pkg.github.com"
30+
DOCKER_REPO_OWNER: "stefanwalther"
31+
DOCKER_REPO_NAME: "besser-app-api"
32+
DOCKER_IMAGE_NAME: "besser-app-api"
33+
DOCKER_IMAGE_TAG: "latest"
34+
NODE_VER: "${{ steps.nvmrc.outputs.text }}"
35+
36+
- name: build
37+
id: build
38+
run: |
39+
make build
40+
41+
- name: build-test
42+
id: build-test
43+
run: |
44+
make build-test
45+
46+
- name: linter
47+
id: run-linter
48+
run: |
49+
make run-linter
50+
51+
- name: tests
52+
run: make run-tests
53+
54+
- name: publish to registry (only master)
55+
if: github.ref == 'refs/heads/master'
56+
run: |
57+
docker login ${{ env.DOCKER_REGISTRY }} --username ${{ env.DOCKER_REPO_OWNER }} --password ${{ secrets.GITHUB_TOKEN }}
58+
docker push ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPO_OWNER}}/${{ env.DOCKER_REPO_NAME }}/${{ env.DOCKER_IMAGE_NAME}}:${{ env.DOCKER_IMAGE_TAG }}
59+

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
14.3.0

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
ARG NODE_VER="14.3.0"
12
# --------------------------------------
23
# BASE NODE
34
# --------------------------------------
4-
FROM node:8.17.0-alpine as BASE
5+
FROM node:${NODE_VER}-alpine as BASE
56

67
ARG PORT=3000
78
ENV PORT=$PORT

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
NODE_VER := $(shell cat .nvmrc)
2+
13
help: ## Show this help.
24
@echo ''
35
@echo 'Available commands:'
@@ -8,3 +10,7 @@ help: ## Show this help.
810
gen-readme: ## Generate README.md (using docker-verb)
911
docker run --rm -v ${PWD}:/opt/verb stefanwalther/verb
1012
.PHONY: gen-readme
13+
14+
build:
15+
docker build -t stefanwalther/docker-test .
16+
.PHONY: build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docker-test",
3-
"version": "0.3.2",
3+
"version": "0.4.0",
44
"description": "Sample docker image to test various scenarios with Docker.",
55
"keywords": [
66
"docker",

0 commit comments

Comments
 (0)