Skip to content

Commit

Permalink
Update aws_deploy_hydroserver.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kjlippold authored Sep 24, 2024
1 parent 2789fac commit e6488b6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/aws_deploy_hydroserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,24 @@ jobs:
]
EOF
- name: Check if ElasticBeanstalk Application Version Exists
id: eb_version_exists
working-directory: ./backend
run: |
aws elasticbeanstalk describe-application-versions \
--application-name hydroserver-${{ github.event.inputs.environment }} \
--version-label "${{ github.event.inputs.hydroserver-version || steps.get_latest_tag.outputs.tag }}" \
|| echo "Application version does not exist."
- name: Delete Existing ElasticBeanstalk Application Version
if: success() && steps.eb_version_exists.outputs != '' # Only run if the version exists
working-directory: ./backend
run: |
aws elasticbeanstalk delete-application-version \
--application-name hydroserver-${{ github.event.inputs.environment }} \
--version-label "${{ github.event.inputs.hydroserver-version || steps.get_latest_tag.outputs.tag }}" \
--delete-source-bundle
- name: Create ElasticBeanstalk Application Version
working-directory: ./backend
run: |
Expand Down

0 comments on commit e6488b6

Please sign in to comment.