Deploy the Stack 'order-manager' in Production environment. #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "SAM Deploy" | |
| run-name: Deploy the Stack '${{ github.event.inputs.stackname }}' in ${{ github.event.inputs.environment }} environment. | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| region: | |
| type: choice | |
| description: AWS Region | |
| options: | |
| - us-east-1 | |
| - us-east-2 | |
| stackname: | |
| type: choice | |
| description: App Name | |
| options: | |
| - hello-world | |
| - order-manager | |
| environment: | |
| description: 'Select Environment' | |
| type: environment | |
| required: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "./${{ github.event.inputs.stackname }}" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - run: sam validate | |
| - uses: aws-actions/setup-sam@v2 | |
| - uses: aws-actions/[email protected] | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ github.event.inputs.region }} | |
| - run: sam build --use-container | |
| # Run Unit tests- Specify unit tests here | |
| # Sam Deploy | |
| - run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset |