-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update github workflow, clean up apply scripts
- Loading branch information
Showing
3 changed files
with
52 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,45 @@ jobs: | |
- 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: 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 | ||
|
||
- name: Build Docker fhir-converter image | ||
run: docker build -t fhir-converter . | ||
|
||
- name: Tag Docker image | ||
run: docker tag fhir-converter:latest 339712971032.dkr.ecr.us-east-1.amazonaws.com/fhir-converter:latest | ||
|
||
- name: Push Docker image | ||
run: docker push 339712971032.dkr.ecr.us-east-1.amazonaws.com/fhir-converter:latest | ||
- 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\"" | ||
terraform init \ | ||
-migrate-state \ | ||
-var-file="$ENVIRONMENT.tfvars" \ | ||
-backend-config "bucket=$BUCKET" \ | ||
-backend-config "dynamodb_table=$DYNAMODB_TABLE" \ | ||
-backend-config "region=$REGION" | ||
terraform apply -var-file="$ENVIRONMENT.tfvars" | ||
# - name: Apply Terraform | ||
# working-directory: ./terraform/implementation/ecs | ||
# env: | ||
# ENVIRONMENT: value | ||
# shell: bash | ||
# run: | | ||
# terraform apply -var-file="$ENVIRONMENT.tfvars" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters