-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (51 loc) · 1.74 KB
/
sub-app-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
name: ❖ App - Deploy
on:
workflow_call:
inputs:
version:
description: 'the release version'
type: string
required: true
stage:
description: 'the environment to deploy to'
type: string
default: 'staging'
stage-url:
description: 'the URL of the environment'
type: string
default: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
aws-role-arn:
description: 'the ARN of the AWS role to assume'
type: string
default: https://${{ vars.SUBDOMAIN_NAME }}.walletconnect.com/health
permissions:
contents: read
id-token: write
jobs:
deploy-app:
name: Deploy App `${{ inputs.stage }}`
runs-on: ubuntu-latest
environment:
name: ${{ inputs.stage }}
url: ${{ inputs.environment_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ inputs.aws-role-arn }}
aws-region: ${{ vars.AWS_REGION }}
- name: Login to ECR repository
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Deploy image to ECS
id: deploy
uses: WalletConnect/actions/aws/ecs/deploy-image/@2.1.4
with:
aws-role-arn: ${{ inputs.aws-role-arn }}
aws-region: ${{ vars.AWS_REGION }}
cluster-name: walletconnect-${{ vars.AWS_REGION }}-${{ inputs.stage }}-${{ vars.IMAGE_NAME }}_cluster
service-name: ${{ vars.IMAGE_NAME }}-service
task-definition-name: ${{ vars.IMAGE_NAME }}
image-name: ${{ steps.login-ecr.outputs.registry }}/${{ vars.IMAGE_NAME }}:${{ inputs.version }}