From 7c8f65b06e24bac6c0f41a321852e96e32b2de53 Mon Sep 17 00:00:00 2001 From: preetam810 <33591924+preetam810@users.noreply.github.com> Date: Mon, 28 Oct 2024 01:09:07 +0530 Subject: [PATCH] Update aws-deploy.yml --- .github/workflows/aws-deploy.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/aws-deploy.yml b/.github/workflows/aws-deploy.yml index 5e53126..83ae354 100644 --- a/.github/workflows/aws-deploy.yml +++ b/.github/workflows/aws-deploy.yml @@ -1,11 +1,22 @@ name: Deploy to AWS on: - push: - branches: ['main', 'release/*', 'develop'] - pull_request: - branches: ['main', 'release/*', 'develop'] workflow_dispatch: + inputs: + environment: + description: 'Environment to deploy: [dev, uat, prod]' + type: string + default: dev + required: true + build-repository-type: + description: 'Environment to deploy: [releases, snapshots]' + type: string + default: releases + required: true + build-version: + description: 'Build version to deploy. Example: python-app-1.0.1.zip' + type: string + required: true jobs: deploy: @@ -27,9 +38,12 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-west-1 - - name: Deploy Application + - name: Download build from build repository run: | - echo "Deploying application to AWS..." - build_version=$(head -n 1 version) - zip python-app-$build_version.zip lambda-s3-dynamodb.py - # aws s3 cp python-app-$build_version.zip s3://vw-demo-730335502100-build-repository/snapshots/ + echo "Downloading build from build repository..." + echo $build-version + echo $build-repository-type + echo $build-version + aws s3 cp s3://vw-demo-730335502100-build-repository/$build-repository-type/$build-version $build-version + ls -ltrh +