Add container build action
This commit is contained in:
parent
62eb38601b
commit
428c187618
2 changed files with 39 additions and 0 deletions
|
@ -37,3 +37,22 @@ jobs:
|
|||
url: https://git.pweapon.org
|
||||
release-dir: releases
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
|
||||
|
||||
build-container:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
tags: odo/dl.emersa.it:latest
|
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
|||
FROM node:20 AS build
|
||||
|
||||
WORKDIR /usr
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . ./
|
||||
COPY --from=build /usr/build /app
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["node", "/app"]
|
Loading…
Add table
Reference in a new issue