Attempt to add Docker image build.

This commit is contained in:
Keanu Timmermans 2020-09-10 20:38:33 +02:00
parent 4da672f419
commit e6c435fa45
No known key found for this signature in database
GPG Key ID: A02B486C183D2147
2 changed files with 24 additions and 9 deletions

24
.github/workflows/image.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Build Docker Image + Push
on:
push:
branches: master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Docker BuildX
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Login to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build the image
run: |
docker buildx build \
--tag keanucode/travbot-v3:latest \
--platform linux/amd64,linux/arm/v8,linux/arm64 .

View File

@ -1,9 +0,0 @@
FROM node:current-alpine
COPY . .
RUN npm i
RUN npm run build
CMD ["npm", "start"]