mirror of
https://github.com/DarthKilroy/Spot.git
synced 2025-12-19 02:06:48 +00:00
add docker build files
This commit is contained in:
parent
dffb46f623
commit
62705ef20d
3 changed files with 46 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
node_modules/
|
||||
34
.github/workflows/docker.yml
vendored
Normal file
34
.github/workflows/docker.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Docker build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
image:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: |
|
||||
ghcr.io/apparyllisorg/spot:${{ github.sha }}
|
||||
ghcr.io/apparyllisorg/spot:latest
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
FROM alpine:latest
|
||||
|
||||
RUN apk add nodejs-current yarn
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock /app/
|
||||
RUN yarn
|
||||
|
||||
COPY . /app
|
||||
|
||||
CMD ["node", "bot.js"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue