Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
IamAbbey committed Aug 27, 2024
1 parent f43de6e commit ddfc61d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
description: Determines whether the preflight step should be triggered
required: false
default: true
allow_feature_branch_deployment:
description: Allow deployment from feature branch
required: false
default: false

aws_access_key_id:
description: AWS access key
Expand Down Expand Up @@ -56,6 +60,7 @@ runs:
- id: get-image-uri
uses: moneymeets/action-ecs-deploy/custom-deploy-steps/get-image-uri@master
with:
allow_feature_branch_deployment: ${{ inputs.allow_feature_branch_deployment }}
ecr_repository: ${{ inputs.ecr_repository }}
aws_region: ${{ inputs.aws_region }}

Expand Down
9 changes: 8 additions & 1 deletion custom-deploy-steps/get-image-uri/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
aws_region:
description: AWS region
required: true
allow_feature_branch_deployment:
description: Allow deployment from features
required: false

outputs:
image-uri:
Expand All @@ -23,7 +26,11 @@ runs:
shell: bash
id: get-image-uri
run: |
imageTag=master-${{ github.sha }}
if [[ "${{ inputs.allow_feature_branch_deployment }}" == "false" ]]; then
imageTag=master-${{ github.sha }}
else
imageTag=$(echo ${{ github.ref_name }} | awk '{print tolower($0)}' | sed -e 's|/|-|g')
fi
IMAGE_TAGS=$(
aws ecr describe-images \
--repository-name ${{ inputs.ecr_repository }} \
Expand Down

0 comments on commit ddfc61d

Please sign in to comment.