Skip to content

Commit

Permalink
feat: add slice to happy deploy stack action (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldengolab authored Jan 4, 2024
1 parent 0b740d8 commit 04dbac6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/actions/deploy-happy-stack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ inputs:
github-repo-branch:
description: "Branch of Github repo to deploy"
required: false
slice:
description: "Slice to deploy"
required: false
slice-default-tag:
description: "For stacks using slices, override the default tag for any images that aren't being built and pushed"
required: false
default: "latest"

runs:
using: "composite"
Expand Down Expand Up @@ -92,6 +99,8 @@ runs:
IMAGE_SOURCE_ENV: ${{ inputs.image-source-env }}
IMAGE_SOURCE_STACK: ${{ inputs.image-source-stack }}
IMAGE_SOURCE_ROLE_ARN: ${{ inputs.image-source-role-arn }}
SLICE: ${{ inputs.slice }}
SLICE_DEFAULT_TAG: ${{ inputs.slice-default-tag }}
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
Expand Down Expand Up @@ -129,6 +138,15 @@ runs:
if [[ ${IMAGE_SOURCE_ROLE_ARN} != "" ]]; then
HAPPY_DEPLOYMENT_FLAGS="$HAPPY_DEPLOYMENT_FLAGS --image-src-role-arn ${IMAGE_SOURCE_ROLE_ARN}"
fi
if [[ ${SLICE} != "" ]]; then
HAPPY_DEPLOYMENT_FLAGS="$HAPPY_DEPLOYMENT_FLAGS --slice ${SLICE}"
fi
if [[ ${SLICE_DEFAULT_TAG} != "" ]]; then
HAPPY_DEPLOYMENT_FLAGS="$HAPPY_DEPLOYMENT_FLAGS --slice-default-tag ${SLICE_DEFAULT_TAG}"
fi
echo "Starting to ${OPERATION} stack ${STACK_NAME} with additional flags: ${HAPPY_DEPLOYMENT_FLAGS}"
echo "Running: '${OPERATION} --aws-profile "" --env=${ENV} ${HAPPY_DEPLOYMENT_FLAGS} ${STACK_NAME}'"
happy ${OPERATION} --aws-profile "" --env=${ENV} ${HAPPY_DEPLOYMENT_FLAGS} ${STACK_NAME}

0 comments on commit 04dbac6

Please sign in to comment.