Skip to content

actions

actions #1

Workflow file for this run

name: Deploy to Elastic Beanstalk on S3 Upload
on:
push:
branches:
- main
paths:
- 'src/app_versions/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Upload zip file to S3
uses: aws-actions/amazon-s3-upload@v2
with:
bucket-name: elasticbeanstalk-${{ env.AWS_REGION }}-${{ secrets.DEV_ACCOUNT_ID }}
object-key: app-${{ github.sha }}.zip
file-path: src/app_versions/app-${{ github.sha }}.zip
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}
AWS_ACCOUNT_ID: ${{ secrets.DEV_ACCOUNT_ID }}
AWS_REGION: us-east-1
- name: Create Elastic Beanstalk Application Version
id: create_app_version
uses: aws-actions/aws-elastic-beanstalk-application-version@v1
with:
application-name: LambdaWebApp2
version-label: v-$(date +%Y-%m-%d-%H-%M-%S)
source-bundle: s3://elasticbeanstalk-${{ env.AWS_REGION }}-${{ secrets.DEV_ACCOUNT_ID }}/app-${{ github.sha }}.zip
region: us-east-1
- name: Get Beanstalk Environment Name
uses: aws-actions/aws-cli@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-east-1 # Replace with your AWS region
command: aws elasticbeanstalk describe-environments --output text | grep EnvironmentName: | awk '{print $2}'

Check failure on line 45 in .github/workflows/dev_s3.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/dev_s3.yaml

Invalid workflow file

You have an error in your yaml syntax on line 45
outputs:
environment_name: ${{ steps.get_env_name.outputs.stdout }}
- name: Deploy Application Version to Elastic Beanstalk
uses: aws-actions/aws-elastic-beanstalk-deploy@v1
with:
application-name: LambdaWebApp2
environment-name: ${{ steps.get_env_name.outputs.environment_name }}
version-label: ${{ steps.create_app_version.outputs.version-label }}
region: us-east-1