-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (68 loc) · 1.97 KB
/
deploy.yml
File metadata and controls
69 lines (68 loc) · 1.97 KB
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
name: 🚀 Deploy
on:
workflow_dispatch:
inputs:
tag_to_deploy:
type: string
description: "Branch name, Version number or Sha hash to deploy"
required: true
environment:
type: choice
description: "Environment to deploy to"
required: true
default: "qa"
options:
- prd
- qa
- sandbox
- staging
- dev
env:
AWS_REGION: "eu-west-1"
CLUSTER_NAME_PREFIX: demo-projects
permissions:
actions: read
checks: read
contents: write
deployments: read
id-token: write
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
run-name: 🚀 Deploy ${{ inputs.tag_to_deploy }} to ${{ inputs.environment }}
jobs:
# =====================================================
# Job: Deploy
# =====================================================
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
strategy:
matrix:
include:
- service_name: react-demo-${{ inputs.environment }}-service
ecr: venly-react-demo-arm-eu-west-1
environment: "${{ inputs.environment }}"
steps:
- name: ✅ Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Deploy Application
uses: ./.github/actions/ecs_deploy
with:
aws_region: ${{ env.AWS_REGION }}
aws_role: ${{ secrets.NONPRD_DEPLOY_ROLE }}
aws_ecr_role: ${{ secrets.RESOURCES_DEPLOY_ROLE }}
cluster_name: ${{ env.CLUSTER_NAME_PREFIX }}-cluster
ecr_repo: ${{ matrix.ecr }}
environment: ${{ matrix.environment }}
service_name: ${{ matrix.service_name }}
slack_webhook: ${{ secrets.SLACK_CI_DEPLOYS }}
tag_to_deploy: ${{ inputs.tag_to_deploy }}
token: ${{ secrets.GITHUB_TOKEN }}