-
Notifications
You must be signed in to change notification settings - Fork 741
95 lines (80 loc) · 2.34 KB
/
staging-deploy-backend.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Staging Deploy Backend services
on:
push:
branches:
- 'staging/**'
- 'staging-**'
paths:
- 'backend/**'
- 'services/libs/**'
- '!backend/src/serverless/microservices/python/**'
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }}
CROWD_ROLE_ARN: ${{ secrets.STAGING_CLUSTER_ROLE_ARN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SLACK_CHANNEL: deploys-staging
SLACK_WEBHOOK: ${{ secrets.STAGING_SLACK_CHANNEL_HOOK }}
jobs:
build-and-push:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: backend
- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT
deploy-api:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-service
with:
service: api
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
deploy-job-generator:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-service
with:
service: job-generator
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
deploy-discord-ws:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-service
with:
service: discord-ws
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}