-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.5 KB
/
ecr_deployment.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
52
53
54
55
name: Deploy to ECR
on:
push:
branches:
#- main
- 1611-create-elastic-container-service
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
region: us-east-1
# - name: Authenticate Docker Registry for ECR
# run: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 339712971032.dkr.ecr.us-east-1.amazonaws.com
- uses: hashicorp/[email protected]
with:
terraform_version: 1.3.3
- name: Init Terraform
working-directory: ./terraform/implementation/ecs
env:
ENVIRONMENT: dev
BUCKET: infra-tfstate-alis-default-aizwjxuh
DYNAMODB_TABLE: infra-tfstate-lock-alis-default-aizwjxuh
REGION: us-east-1
OWNER: alis
PROJECT: infra
shell: bash
run: |
touch $ENVIRONMENT.tfvars
echo "owner = \"$OWNER\""
echo "project = \"$PROJECT\""
echo "region = \"$REGION\""
./ecs.sh -e dev --ci
# - name: Apply Terraform
# working-directory: ./terraform/implementation/ecs
# env:
# ENVIRONMENT: value
# shell: bash
# run: |
# terraform apply -var-file="$ENVIRONMENT.tfvars"