Skip to content

Commit

Permalink
Get Beanstalk env name from GHA secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
maacpiash committed Sep 16, 2024
1 parent a4bd0e0 commit 5723808
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
env:
PROJECT_LOCATION: src/Blazing.csproj
ELASTIC_BEANSTALK_NAME: Blazing
ELASTIC_BEANSTALK_ENV_NAME: Development

jobs:
build:
Expand Down Expand Up @@ -51,5 +50,5 @@ jobs:
run: |
aws s3 cp "deploy-files/${{ github.run_id }}.zip" s3://elasticbeanstalk-ap-southeast-2-${{ secrets.AWS_ACCOUNT_ID }}/artifact/blazing-blazor-app/
aws elasticbeanstalk create-application-version --application-name $ELASTIC_BEANSTALK_NAME --version-label ${{ github.run_id }} --description ${{ github.run_id }} --source-bundle S3Bucket="elasticbeanstalk-ap-southeast-2-${{ secrets.AWS_ACCOUNT_ID }}",S3Key="artifact/blazing-blazor-app/${{ github.run_id }}.zip"
aws elasticbeanstalk update-environment --application-name $ELASTIC_BEANSTALK_NAME --environment-name $ELASTIC_BEANSTALK_ENV_NAME --version-label ${{ github.run_id }}
aws elasticbeanstalk wait environment-updated --application-name $ELASTIC_BEANSTALK_NAME --environment-name $ELASTIC_BEANSTALK_ENV_NAME
aws elasticbeanstalk update-environment --application-name $ELASTIC_BEANSTALK_NAME --environment-name ${{ secrets.AWS_BEANSTALK_ENV }} --version-label ${{ github.run_id }}
aws elasticbeanstalk wait environment-updated --application-name $ELASTIC_BEANSTALK_NAME --environment-name ${{ secrets.AWS_BEANSTALK_ENV }}

0 comments on commit 5723808

Please sign in to comment.