From 99e132be73b8885b503aa03a17b964b776ffd955 Mon Sep 17 00:00:00 2001 From: Mike Yavorsky Date: Tue, 9 Jul 2024 19:43:09 -0400 Subject: [PATCH 1/6] deploy scheduled task in github action --- .github/workflows/aws-ecs-deploy.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/aws-ecs-deploy.yml b/.github/workflows/aws-ecs-deploy.yml index 14d13b2..b91ef4e 100644 --- a/.github/workflows/aws-ecs-deploy.yml +++ b/.github/workflows/aws-ecs-deploy.yml @@ -4,6 +4,7 @@ on: branches: - "main" - "add-dockerfile" + - "update-action" release: types: - created @@ -114,12 +115,8 @@ jobs: task-definition: task-def-scraper.json container-name: ${{ needs.setup_env.outputs.AWS_APPENV }} image: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ needs.setup_env.outputs.AWS_APPENV }}:${{ needs.setup_env.outputs.IMAGE_TAG }} - - name: Run Task on Amazon ECS - uses: mikeyavorsky/amazon-ecs-run-task@main + - name: Deploy to Amazon ECS Scheduled Tasks + uses: airfordable/ecs-deploy-task-definition-to-scheduled-task@v2.0.0 with: - task-definition: ${{ steps.task-definition.outputs.task-definition }} cluster: infra-prod - count: 1 - network-configuration: network-config-scraper.json - launch-type: FARGATE - started-by: github-actions-${{ github.actor }} + task-definition: task-def-scraper.json \ No newline at end of file From a3bea27281c300db95ecf9aaa12fee03863c796f Mon Sep 17 00:00:00 2001 From: Mike Yavorsky Date: Tue, 9 Jul 2024 20:03:33 -0400 Subject: [PATCH 2/6] bump action version --- .github/workflows/aws-ecs-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aws-ecs-deploy.yml b/.github/workflows/aws-ecs-deploy.yml index b91ef4e..38cea84 100644 --- a/.github/workflows/aws-ecs-deploy.yml +++ b/.github/workflows/aws-ecs-deploy.yml @@ -77,7 +77,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64 @@ -116,7 +116,7 @@ jobs: container-name: ${{ needs.setup_env.outputs.AWS_APPENV }} image: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ needs.setup_env.outputs.AWS_APPENV }}:${{ needs.setup_env.outputs.IMAGE_TAG }} - name: Deploy to Amazon ECS Scheduled Tasks - uses: airfordable/ecs-deploy-task-definition-to-scheduled-task@v2.0.0 + uses: airfordable/ecs-deploy-task-definition-to-scheduled-task@v2.1.0 with: cluster: infra-prod task-definition: task-def-scraper.json \ No newline at end of file From c70f3a15f903e045860615c4d838d7c53c97f415 Mon Sep 17 00:00:00 2001 From: Mike Yavorsky Date: Tue, 9 Jul 2024 20:11:09 -0400 Subject: [PATCH 3/6] use fork --- .github/workflows/aws-ecs-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aws-ecs-deploy.yml b/.github/workflows/aws-ecs-deploy.yml index 38cea84..bef68c1 100644 --- a/.github/workflows/aws-ecs-deploy.yml +++ b/.github/workflows/aws-ecs-deploy.yml @@ -116,7 +116,7 @@ jobs: container-name: ${{ needs.setup_env.outputs.AWS_APPENV }} image: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ needs.setup_env.outputs.AWS_APPENV }}:${{ needs.setup_env.outputs.IMAGE_TAG }} - name: Deploy to Amazon ECS Scheduled Tasks - uses: airfordable/ecs-deploy-task-definition-to-scheduled-task@v2.1.0 + uses: mikeyavorsky/ecs-deploy-task-definition-to-scheduled-task@fix-for-arm with: cluster: infra-prod task-definition: task-def-scraper.json \ No newline at end of file From c4e6124c5c007399ea471ece24c82f56da84fffe Mon Sep 17 00:00:00 2001 From: Mike Yavorsky Date: Tue, 9 Jul 2024 20:55:14 -0400 Subject: [PATCH 4/6] use published version --- .github/workflows/aws-ecs-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aws-ecs-deploy.yml b/.github/workflows/aws-ecs-deploy.yml index bef68c1..2e4d6e7 100644 --- a/.github/workflows/aws-ecs-deploy.yml +++ b/.github/workflows/aws-ecs-deploy.yml @@ -116,7 +116,7 @@ jobs: container-name: ${{ needs.setup_env.outputs.AWS_APPENV }} image: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ env.AWS_REGION }}.amazonaws.com/${{ needs.setup_env.outputs.AWS_APPENV }}:${{ needs.setup_env.outputs.IMAGE_TAG }} - name: Deploy to Amazon ECS Scheduled Tasks - uses: mikeyavorsky/ecs-deploy-task-definition-to-scheduled-task@fix-for-arm + uses: mikeyavorsky/ecs-deploy-task-definition-to-scheduled-task@v3.1.0 with: cluster: infra-prod task-definition: task-def-scraper.json \ No newline at end of file From 493f05b04afdb7703c43fc3d03880b8ce6ec6514 Mon Sep 17 00:00:00 2001 From: Mike Yavorsky Date: Tue, 9 Jul 2024 21:01:40 -0400 Subject: [PATCH 5/6] fix rollback of docker action version --- .github/workflows/aws-ecs-deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/aws-ecs-deploy.yml b/.github/workflows/aws-ecs-deploy.yml index 2e4d6e7..6b678d6 100644 --- a/.github/workflows/aws-ecs-deploy.yml +++ b/.github/workflows/aws-ecs-deploy.yml @@ -3,7 +3,6 @@ on: push: branches: - "main" - - "add-dockerfile" - "update-action" release: types: @@ -77,7 +76,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 From d4a171dc6d668d0e87c0ed7461565494982ddf11 Mon Sep 17 00:00:00 2001 From: Mike Yavorsky Date: Tue, 9 Jul 2024 21:18:15 -0400 Subject: [PATCH 6/6] fix whitespace --- .github/workflows/aws-ecs-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/aws-ecs-deploy.yml b/.github/workflows/aws-ecs-deploy.yml index 6b678d6..1401a88 100644 --- a/.github/workflows/aws-ecs-deploy.yml +++ b/.github/workflows/aws-ecs-deploy.yml @@ -118,4 +118,4 @@ jobs: uses: mikeyavorsky/ecs-deploy-task-definition-to-scheduled-task@v3.1.0 with: cluster: infra-prod - task-definition: task-def-scraper.json \ No newline at end of file + task-definition: task-def-scraper.json