File tree Expand file tree Collapse file tree 5 files changed +69
-2
lines changed Expand file tree Collapse file tree 5 files changed +69
-2
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change
1
+ 14.3.0
Original file line number Diff line number Diff line change
1
+ ARG NODE_VER="14.3.0"
1
2
# --------------------------------------
2
3
# BASE NODE
3
4
# --------------------------------------
4
- FROM node:8.17.0 -alpine as BASE
5
+ FROM node:${NODE_VER} -alpine as BASE
5
6
6
7
ARG PORT=3000
7
8
ENV PORT=$PORT
Original file line number Diff line number Diff line change
1
+ NODE_VER := $(shell cat .nvmrc)
2
+
1
3
help : # # Show this help.
2
4
@echo ' '
3
5
@echo ' Available commands:'
@@ -8,3 +10,7 @@ help: ## Show this help.
8
10
gen-readme : # # Generate README.md (using docker-verb)
9
11
docker run --rm -v ${PWD} :/opt/verb stefanwalther/verb
10
12
.PHONY : gen-readme
13
+
14
+ build :
15
+ docker build -t stefanwalther/docker-test .
16
+ .PHONY : build
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " docker-test" ,
3
- "version" : " 0.3.2 " ,
3
+ "version" : " 0.4.0 " ,
4
4
"description" : " Sample docker image to test various scenarios with Docker." ,
5
5
"keywords" : [
6
6
" docker" ,
You can’t perform that action at this time.
0 commit comments