-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.81 KB
/
deploy.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
55
56
57
58
59
60
61
62
name: deploy front
on:
push:
branches: [ "master" ]
jobs:
# check-code:
# runs-on: [self-hosted, linux]
# steps:
# - uses: actions/checkout@master
# - run: |
# export PATH=$PATH:/opt/sonar-scanner/bin/
# echo $PATH
# sonar-scanner \
# -Dsonar.projectKey=front-gamein-2022 \
# -Dsonar.sources=. \
# -Dsonar.host.url=http://192.168.0.202:9000 \
# -Dsonar.token=sqp_528a53971f596e815d5f323dca35b615485f77b4
build-front:
runs-on: [app-2]
steps:
- uses: actions/checkout@master
- run: |
ls -la
docker login -u daria -p 7HlUyiSD https://registry.dariasystem.com
docker build -t registry.dariasystem.com/gamein/front-team:dev .
docker push registry.dariasystem.com/gamein/front-team:dev
deploy-front:
needs: build-front
runs-on: [app]
steps:
- uses: actions/checkout@master
- run: |
ls -la
docker login -u daria -p 7HlUyiSD https://registry.dariasystem.com
docker pull registry.dariasystem.com/gamein/front-team:dev
docker rm -f front-team
docker-compose up -d front-team
sleep 5
docker-compose ps
deploy-front-1:
needs: build-front
runs-on: [app-1]
steps:
- uses: actions/checkout@master
- run: |
ls -la
docker login -u daria -p 7HlUyiSD https://registry.dariasystem.com
docker pull registry.dariasystem.com/gamein/front-team:dev
docker rm -f front-team-1
docker compose up -d front-team-1
sleep 5
docker compose ps