Skip to content

Commit

Permalink
feat: update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
hi02102002 committed May 17, 2024
1 parent 926a2a7 commit f727112
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
node_modules
.env
chatbox
dist-components
25 changes: 25 additions & 0 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name:
on:
push:
branches:
- 'main'
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and Push to Docker Hub
uses: docker/build-push-action@v5
id: docker_build_client
with:
context: .
file: ./Dockerfile
builder: ${{steps.buildx.outputs.name}}
push: true
tags: dialoguebot/chatbot:latest
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20

WORKDIR /app

COPY package.json .

RUN npm install

COPY . .

EXPOSE 3978

CMD [ "npm", "run", "start" ]

0 comments on commit f727112

Please sign in to comment.