-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (47 loc) · 1.24 KB
/
prod.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
name: 'Production'
on:
push:
branches-ignore:
- '**'
tags:
- 'v**'
defaults:
run:
shell: 'bash'
permissions:
contents: read
id-token: write
env:
AWS_REGION: 'us-east-1'
AWS_DEFAULT_REGION: 'us-east-1'
AWS_ECR_REGISTRY_ID: '222484291001'
WORKSPACE: 'prod'
jobs:
hubzone_api:
runs-on: 'ubuntu-latest'
environment: 'prod'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v3'
- name: 'Connecting to AWS using OIDC'
uses: 'aws-actions/configure-aws-credentials@v2'
with:
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: 'Connecting to ECR'
uses: 'aws-actions/amazon-ecr-login@v1'
id: 'ecr-login'
with:
registries: ${{ env.AWS_ECR_REGISTRY_ID }}
- name: 'Building Container'
uses: './.github/actions/ecr'
with:
image: '${{ steps.ecr-login.outputs.registry }}/hubzone-api'
- name: 'Install Terraform 1.0.9'
uses: 'hashicorp/setup-terraform@v2'
with:
terraform_version: '1.0.9'
- name: 'Deploying Service'
uses: './.github/actions/terraform'
with:
workspace: ${{ env.WORKSPACE }}