diff --git a/.github/workflows/development-ci.yaml b/.github/workflows/development-ci.yaml new file mode 100644 index 0000000..40b7d77 --- /dev/null +++ b/.github/workflows/development-ci.yaml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 0d482d5..56f5dd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]