Skip to content

Commit

Permalink
Merge pull request #9 from 0xPolygon/DEVOPS-2622-ethereum-producer-de…
Browse files Browse the repository at this point in the history
…ployment

Update context for dockerfile build
  • Loading branch information
sshrihar authored Mar 6, 2024
2 parents 3adcf19 + 65ee32f commit 570a68e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ecs_deploy_docker_taskdef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
aws_region:
required: false
default: "eu-west-1"
type: string
type: string
environment:
required: false
default: "staging"
Expand Down Expand Up @@ -73,6 +73,11 @@ jobs:
IMAGE_TAG: ${{ github.sha }}
ECR_REPOSITORY: ${{ inputs.app_name }}-ecr
run: |
current_dir=$(realpath .)
target_dir=$(dirname "$(realpath "${{ inputs.docker_file }}")")
if [[ "$current_dir" != "$target_dir" ]]; then
cd "$target_dir"
fi
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f ${{ inputs.docker_file }} .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/*

0 comments on commit 570a68e

Please sign in to comment.