Skip to content

Auto-merge main back to qa #53

Auto-merge main back to qa

Auto-merge main back to qa #53

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- qa
jobs:
deploy:
name: Deploy to ECS
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set branch name
id: vars
run: echo ::set-output name=stage::${GITHUB_REF#refs/*/}
- name: Set env.ENVIRONMENT_NAME
run: |
if [[ ${{ steps.vars.outputs.stage }} == 'main' ]]; then
echo "ENVIRONMENT_NAME=prod" >> "$GITHUB_ENV"
else
echo "ENVIRONMENT_NAME=${{ steps.vars.outputs.stage }}" >> "$GITHUB_ENV"
fi
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Setup AWS Copilot
uses: softprops/setup-aws-copilot@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Deploy ECS
run: |
./update-ecs.sh demo ${{ env.ENVIRONMENT_NAME }}