-
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.94 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: On Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build app
run: |
cd app
yarn && yarn build
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build and push Api Docker image
run: |
cd app
VERSION=$(jq -r '.version' package.json)
docker build -f apps/api/Dockerfile --target production -t crypitor/crypitor-api:${VERSION} -t crypitor/crypitor-api:latest .
docker push crypitor/crypitor-api:${VERSION}
docker push crypitor/crypitor-api:latest
- name: Build and push Api Docker image
run: |
cd app
VERSION=$(jq -r '.version' package.json)
docker build -f apps/polling-block/Dockerfile --target production -t crypitor/crypitor-polling-block:${VERSION} -t crypitor/crypitor-polling-block:latest .
docker push crypitor/crypitor-polling-block:${VERSION}
docker push crypitor/crypitor-polling-block:latest
- name: Build and push Monitor Docker image
run: |
cd app
VERSION=$(jq -r '.version' package.json)
docker build -f apps/monitor-service/Dockerfile --target production -t crypitor/crypitor-monitor:${VERSION} -t crypitor/crypitor-monitor:latest .
docker push crypitor/crypitor-monitor:${VERSION}
docker push crypitor/crypitor-monitor:latest
- name: Build and push Worker Docker image
run: |
cd app
VERSION=$(jq -r '.version' package.json)
docker build -f apps/worker-service/Dockerfile --target production -t crypitor/crypitor-worker:${VERSION} -t crypitor/crypitor-worker:latest .
docker push crypitor/crypitor-worker:${VERSION}
docker push crypitor/crypitor-worker:latest