-
-
Notifications
You must be signed in to change notification settings - Fork 26
34 lines (32 loc) · 1.11 KB
/
prod-services-deploy.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
name: prod-services-deploy
on:
push:
paths:
- 'services/**'
- 'crates/**'
- 'migrations/schema/*'
- 'migrations/seed/*'
- 'client/**'
- 'docker/**'
branches:
- 'master'
jobs:
deploy_prod:
name: deploy services to prod cloud environment
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
steps:
- uses: actions/checkout@v4
- name: mask values
run: echo "::add-mask::${{ secrets.AWS_ACCOUNT_ID }}"
- name: deploy services to prod cloud environment
run: |
for app in $(bash scripts/list-deployments.sh | grep -v client | xargs basename -a); do
# tag newly pushed prod images with master merge commit sha
bash scripts/tag-merge-commit.sh --app-name $app --env prod --env-id ${{ secrets.PROD_ENV_ID }};
# deploy newly tagged images to prod cloud
bash scripts/deploy-last-image.sh --app-name $app --env prod --env-id ${{ secrets.PROD_ENV_ID }};
done