Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
ci: Update build-and-publish.yml
Browse files Browse the repository at this point in the history
- Fix GitHub action syntax
  • Loading branch information
lealceldeiro committed Jul 19, 2022
1 parent 87394a3 commit e287ec1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ jobs:
-c accountId=${{ secrets.AWS_ACCOUNT_ID }} \
-c region=${{ secrets.AWS_DEFAULT_REGION }} \
-c allowedOrigins=${{ secrets.CORE_APP_ALLOWED_ORIGINS }} \
-c environmentName=${ DEPLOY_ENV } \
-c environmentName=${{ env.DEPLOY_ENV }} \
-c applicationName=${{ env.APP_NAME }} \
-c dockerRepositoryName=${{ env.ECR_REPO_NAME }} \
-c dockerImageTag=${ DOCKER_IMAGE }
-c dockerImageTag=${{ env.DOCKER_IMAGE }}
- name: AWS Clean Up
if: ${{ env.DEPLOY_ENV == 'staging' || env.DEPLOY_ENV == 'prod' }}
run: |
aws cloudformation describe-stacks --region ${{ secrets.AWS_DEFAULT_REGION }} --query "Stacks[].StackName" --output text | sed -e "s/\s\+/\n/g" | grep -e "${ DEPLOY_ENV }-${{ env.APP_NAME }}-parameters-be-service-stack-.*" | sort -r | tail -n+2 > stacks_to_delete.txt
aws cloudformation describe-stacks --region ${{ secrets.AWS_DEFAULT_REGION }} --query "Stacks[].StackName" --output text | sed -e "s/\s\+/\n/g" | grep -e "${{ env.DEPLOY_ENV }}-${{ env.APP_NAME }}-parameters-be-service-stack-.*" | sort -r | tail -n+2 > stacks_to_delete.txt
for stack in $(cat stacks_to_delete.txt); do aws cloudformation delete-stack --stack-name $stack --region ${{ secrets.AWS_DEFAULT_REGION }}; done

0 comments on commit e287ec1

Please sign in to comment.