Skip to content

Commit a98c327

Browse files
committed
2 parents 6f603a2 + 0e0734f commit a98c327

File tree

5 files changed

+340
-593
lines changed

5 files changed

+340
-593
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build_and_test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Build Docker image
13+
run: docker build -t terminusdb-change-request-api .
14+
15+
build-and-push-image:
16+
runs-on: ubuntu-latest
17+
needs: [build_and_test]
18+
if: startsWith(github.ref, 'refs/tags/v')
19+
env:
20+
IMAGE_NAME: terminusdb/terminusdb-change-request-api
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
26+
- name: Log in to the Container registry
27+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
28+
with:
29+
username: terminusdb
30+
password: ${{ secrets.DOCKER_PASS }}
31+
32+
- name: Extract metadata (tags, labels) for Docker
33+
id: meta
34+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
35+
with:
36+
images: ${{ env.IMAGE_NAME }}
37+
38+
- name: Build and push Docker image
39+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:18
2+
3+
WORKDIR /app/
4+
COPY . /app/
5+
RUN npm i --legacy-peer-deps && \
6+
npm run build
7+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)