diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml index 751eed5..03dccc6 100644 --- a/.github/workflows/aws.yml +++ b/.github/workflows/aws.yml @@ -30,7 +30,7 @@ concurrency: cancel-in-progress: true env: - AWS_REGION: ${{ secrets.AWS_REGION }} # Use GitHub secret for AWS region + AWS_REGION: ${{ secrets.AWS_REGION }} # Use GitHub secrets for AWS region ECR_REPOSITORY: app # Set this to your Amazon ECR repository name ECS_SERVICE: SkyDevOps # Set this to your Amazon ECS service name ECS_CLUSTER: Sky # Set this to your Amazon ECS cluster name @@ -62,16 +62,16 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v2 - - name: Build and push image to Amazon ECR + - name: Build and push new Docker image to Amazon ECR id: build-image env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} IMAGE_TAG: latest run: | - # Use Docker Buildx to build the image for ARM64 - docker buildx build --platform linux/arm64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + # Use Docker Buildx to build the image for x86_64 + docker buildx build --platform linux/amd64 --push -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT - - name: Redeploy to ECS + - name: Deploy to Amazon ECS run: | aws ecs update-service --cluster ${{ env.ECS_CLUSTER }} --service ${{ env.ECS_SERVICE }} --force-new-deployment