Skip to content

Commit

Permalink
add dockerfile and build path
Browse files Browse the repository at this point in the history
  • Loading branch information
haedaal authored May 18, 2022
1 parent abedc7d commit 19391cc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ inputs:
ecr-repo:
description: "ECR Repository"
required: true
ecs-service:
description: "ECS Service"
required: true
ecs-cluster:
description: "ECS Cluster"
required: true
ecs-service:
description: "ECS Service"
required: true
task-definition:
description: "ECS Service task definition"
required: true
Expand All @@ -22,6 +22,14 @@ inputs:
aws-region:
description: "AWS Region"
required: true
dockerfile:
description: "Dockerfile"
required: false
default: "./Dockerfile"
build-path:
description: "Docker build path"
required: false
default: "."

runs:
using: "composite"
Expand All @@ -45,7 +53,7 @@ runs:
TAG: ${{ github.sha }}
shell: bash
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$TAG .
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$TAG -f ${{ inputs.dockerfile }} ${{ inputs.build-path }}
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
Expand Down Expand Up @@ -75,6 +83,7 @@ runs:
container-name: ${{ steps.container-name.outputs.name }}
image: ${{ steps.build-image.outputs.image }}

# https://github.com/aws-actions/amazon-ecs-deploy-task-definition/issues/176
- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
Expand Down

0 comments on commit 19391cc

Please sign in to comment.