Skip to content
This repository was archived by the owner on Dec 12, 2019. It is now read-only.

Commit 940dde9

Browse files
committed
added dockerfile, and ci-cd docker image build
1 parent c549dcb commit 940dde9

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.github/workflows/docker.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Docker CD
2+
3+
on: push
4+
5+
jobs:
6+
build-image:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: registry-login
11+
uses: actions/docker/login@master
12+
env:
13+
DOCKER_REGISTRY_URL: docker.pkg.github.com
14+
DOCKER_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
15+
DOCKER_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
16+
- name: build-image
17+
uses: actions/docker/cli@master
18+
with:
19+
args: build -t docker.pkg.github.com/${{ github.repository }}/app .
20+
- name: push-image
21+
uses: actions/docker/cli@master
22+
with:
23+
args: push docker.pkg.github.com/${{ github.repository }}/app

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Node CI
22

3-
on: [push]
3+
on: push
44

55
jobs:
66
build:

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:10
2+
WORKDIR /usr/src/app
3+
COPY package*.json ./
4+
RUN npm install
5+
COPY . .
6+
RUN npm run build
7+
EXPOSE 8080
8+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)