-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (42 loc) · 1.53 KB
/
CD.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
name: pothole CD
on:
pull_request_target:
types:
- closed
branches:
- 'develop'
jobs:
build:
uses: ./.github/workflows/build-CD.yml
secrets:
CORE_APPLICATION_DEV_YML: ${{ secrets.CORE_APPLICATION_DEV_YML }}
MANAGER_APPLICATION_YML: ${{ secrets.MANAGER_APPLICATION_YML }}
MANAGER_APPLICATION_DEV_YML: ${{ secrets.MANAGER_APPLICATION_DEV_YML }}
WORKER_APPLICATION_YML: ${{ secrets.WORKER_APPLICATION_YML }}
WORKER_APPLICATION_DEV_YML: ${{ secrets.WORKER_APPLICATION_DEV_YML }}
deploy_manager:
if: github.event.pull_request.merged == true
&& (contains(github.head_ref, 'manager') || contains(github.head_ref, 'core'))
needs: build
uses: ./.github/workflows/reusable-CD.yml
with:
module: manager
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
EC2_IP: ${{ secrets.EC2_IP }}
EC2_USERNAME: ${{ secrets.EC2_USERNAME }}
EC2_SSH_KEY: ${{ secrets.EC2_SSH_KEY }}
deploy_worker:
if: github.event.pull_request.merged == true
&& (contains(github.head_ref, 'worker') || contains(github.head_ref, 'core'))
needs: build
uses: ./.github/workflows/reusable-CD.yml
with:
module: worker
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
EC2_IP: ${{ secrets.EC2_IP }}
EC2_USERNAME: ${{ secrets.EC2_USERNAME }}
EC2_SSH_KEY: ${{ secrets.EC2_SSH_KEY }}