File tree Expand file tree Collapse file tree 5 files changed +340
-593
lines changed Expand file tree Collapse file tree 5 files changed +340
-593
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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" ]
You can’t perform that action at this time.
0 commit comments