Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
namachan10777 committed Oct 20, 2024
1 parent 2eacb43 commit 4197d22
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker Build and Push

on:
push:
branches:
- main

permissions:
id-token: write
contents: read
actions: read

jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push images
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
target: ghcr.io/hpcslab/cfp-summary-server
tags: ${{ github.sha }}
push: true
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:22

WORKDIR /work
COPY api .
COPY db .
COPY views .
COPY index.js .
COPY package.json .

RUN npm install --frozen-lockfile

ENTRYPOINT [ "/usr/local/bin/node" ]
CMD [ "./index.js" ]

0 comments on commit 4197d22

Please sign in to comment.