From 47894f113d7011ce14d10a89377c76ddd78a205a Mon Sep 17 00:00:00 2001 From: John Brunton <1276413+jbrunton@users.noreply.github.com> Date: Sun, 8 Sep 2024 13:41:54 +0100 Subject: [PATCH] feat: remove ecs deployment step --- .github/workflows/deploy-dev.yml | 43 -------------------------------- 1 file changed, 43 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 6758a4aa..cc893e07 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -30,8 +30,6 @@ jobs: needs: [build-api] runs-on: ubuntu-latest steps: - - run: | - echo "CURRENT_TASK_DEFINITION=${{ runner.temp }}/currentTaskDefinition.json" >> $GITHUB_ENV - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 @@ -67,44 +65,3 @@ jobs: AWS_REGION: us-east-1 API_TAG: ${{ needs.build-api.outputs.tag }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get pulumi outputs - id: pulumi-outputs - run: | - pulumi stack select ${{ github.head_ref || github.ref_name }} - echo "cluster=$(pulumi stack output cluster)" > $GITHUB_OUTPUT - echo "service=$(pulumi stack output apiService)" > $GITHUB_OUTPUT - echo "taskDefinitionArn=$(pulumi stack output apiTaskDefinitionArn)" > $GITHUB_OUTPUT - working-directory: pulumi - env: - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - - - name: Get current task definition - id: current-task-def - run: | - export TASK_DEFINITION_FILE=${{ runner.temp }}/taskDefinition.json - aws ecs describe-task-definition --task-definition $TASK_DEFINITION_ARN \ - --query taskDefinition --output json \ - | jq 'del(.revision, .compatibilities, .taskDefinitionArn, .requiresAttributes, .status, .registeredAt, .registeredBy)' \ - > $TASK_DEFINITION_FILE - echo "taskDefinitionFile=$TASK_DEFINITION_FILE" > $GITHUB_OUTPUT - env: - TASK_DEFINITION_ARN: ${{ steps.pulumi-outputs.outputs.taskDefinitionArn }} - working-directory: pulumi - - - name: Render new task definition - id: new-task-def - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: ${{ steps.current-task-def.outputs.taskDefinitionFile }} - container-name: chat-demo-api - image: ${{ needs.build-api.outputs.tag }} - - - name: Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v2 - with: - task-definition: ${{ steps.new-task-def.outputs.task-definition }} - service: ${{ steps.pulumi-outputs.outputs.service }} - cluster: ${{ steps.pulumi-outputs.outputs.cluster }} - wait-for-service-stability: true - wait-for-task-stopped: true