Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Commit 751b5b6

Browse files
committed
add docker pipeline
1 parent 42c5fc3 commit 751b5b6

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
11+
build-package:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Build the Docker image
19+
run: docker build . --file Dockerfile --tag ghcr.io/ottrone/dailyottrbot:latest
20+
21+
- name: Publish Docker image to Github Packages
22+
shell: bash
23+
env:
24+
PAT: ${{ secrets.PAT }}
25+
run: |
26+
echo $PAT | docker login ghcr.io --username alexottr --password-stdin
27+
docker push ghcr.io/ottrone/dailyottrbot:latest
28+
docker logout
29+
30+

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:alpine
2+
3+
RUN mkdir -p /opt/lexbot
4+
WORKDIR /opt/lexbot
5+
6+
COPY package.json ./
7+
8+
RUN npm install
9+
10+
COPY . .
11+
12+
CMD [ "node", "bot.js" ]

0 commit comments

Comments
 (0)