Skip to content

Commit

Permalink
feature: Add initial ci setup and change sequence for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamada committed Jan 24, 2024
1 parent c3ea207 commit 717466d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/development-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: ci

on:
push:
branches:
- main
workflow_dispatch:
pull_request:

jobs:
build:
name: "build-dev-docker-image"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
push: true
tags: ghcr.io/distributive-network/dcp-rest:${{ github.sha }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:20
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN ./build-docs.sh
RUN npm install
EXPOSE 1234
CMD ["node", "app.js"]

0 comments on commit 717466d

Please sign in to comment.