Skip to content

SKEMA AWS

SKEMA AWS #287

Workflow file for this run

name: SKEMA AWS
on:
workflow_run:
workflows: ["SKEMA docker"]
branches: [main]
types: ["completed"]
env:
SKEMA_ECS_CLUSTER_NAME_MAIN: ${{ secrets.SKEMA_ECS_CLUSTER_NAME_MAIN }}
SKEMA_ECS_SERVICE_NAME_MAIN: ${{ secrets.SKEMA_ECS_SERVICE_NAME_MAIN }}
SKEMA_AWS_REGION: ${{ secrets.SKEMA_AWS_REGION }}
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: "deploy skema system to AWS"
runs-on: ubuntu-latest
steps:
# main deployment
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.SKEMA_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SKEMA_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.SKEMA_AWS_REGION }}
- name: Deploy
if: github.ref == 'refs/heads/main'
run: |
# update skema-py
aws ecs update-service --cluster $SKEMA_ECS_CLUSTER_NAME_MAIN --service darpa-askem-main-ecs-skema-py --force-new-deployment --region $SKEMA_AWS_REGION &>/dev/null
# update skema-rs
aws ecs update-service --cluster $SKEMA_ECS_CLUSTER_NAME_MAIN --service darpa-askem-main-ecs-skema-rs --force-new-deployment --region $SKEMA_AWS_REGION &>/dev/null