-
Notifications
You must be signed in to change notification settings - Fork 25
51 lines (43 loc) · 1.29 KB
/
deploy-api.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
name: Deploy api
on:
push:
branches:
- main
- ts-backend
env:
AWS_REGION: us-east-2
GITHUB_TOKEN: ${{ secrets.TS_IMMUTABLE_SDK_GITHUB_TOKEN }}
jobs:
build-deploy-api:
name: Build and Deploy API
runs-on: ubuntu-latest-4-cores
steps:
- name: configure aws credentials
id: aws-credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: setup
uses: ./.github/actions/setup
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ env.GITHUB_TOKEN }}
- name: Login to Amazon ECR
id: login-ecr
uses: docker/login-action@v3
with:
registry: ${{ steps.aws-credentials.outputs.aws-account-id }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: hmarr/debug-action@v3
- name: build-image
run: |
yarn nx run api:deploy --configuration=ci