forked from dydxfoundation/bridge-user-interface
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.3 KB
/
cicd.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
name: Vota bridge CICD
on:
push:
branches: [dora-migrate-vota]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Build image
env:
BUILD_ARG: ${{ github.ref_name }}
run: |
docker build -t vota-bridge-ui:local -f Dockerfile .
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ap-southeast-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'
- name: Tag, push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: vota-bridge-ui
IMAGE_TAG: ${{ github.ref_name }}
run: |
docker tag vota-bridge-ui:local $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
- name: Redeploy on aws
run: |
aws eks update-kubeconfig --region ap-southeast-1 --name ${{ secrets.EKS_CLUSTER }}
kubectl rollout restart deploy vota-bridge-ui-dev