- name:Build, tag, and push docker image to ECR if there is no image, failing for releases
id:build-image
if:${{ env.image-exists == 'false' }}
env:
registry:${{ steps.ecr-login.outputs.registry }}
commit_tag:${{ env.commit_sha }}
commit_tag:${{ github.sha }}
run:|
if [[ ${{ inputs.environment }} == 'production' ]]; then
echo "Error: Deployment to production environment is not allowed as there is no docker image (i.e. the AWS deploy on staging was unsuccessful for this commit)."