From be65c60a3adc98f4c021bfc9bd472a31c35f8ae3 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Sun, 14 Sep 2025 08:57:56 +0900 Subject: [PATCH] =?UTF-8?q?canary=E9=AF=96=E3=81=AF=E3=82=AA=E3=83=B3?= =?UTF-8?q?=E3=83=97=E3=83=AC=E3=81=AB=E7=A7=BB=E8=A1=8C=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7action=E4=B8=8D=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deploy_ecs_staging_stationapi.yml | 75 ------------------- 1 file changed, 75 deletions(-) delete mode 100644 .github/workflows/deploy_ecs_staging_stationapi.yml diff --git a/.github/workflows/deploy_ecs_staging_stationapi.yml b/.github/workflows/deploy_ecs_staging_stationapi.yml deleted file mode 100644 index 50348881..00000000 --- a/.github/workflows/deploy_ecs_staging_stationapi.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Deploy StationAPI to Staging Environment on Amazon ECS - -on: - workflow_dispatch: - push: - branches: - - dev - paths: - - ".sqlx/**" - - "data/**" - - "scripts/**" - - "stationapi/**" - - "Cargo.lock" - - "Cargo.toml" - -env: - AWS_REGION: ${{ secrets.AWS_REGION }} - ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }} - ECS_SERVICE: ${{ secrets.ECS_SERVICE }} - ECS_CLUSTER: ${{ secrets.ECS_CLUSTER }} - ECS_TASK_DEFINITION: ${{ secrets.ECS_TASK_DEFINITION }} - CONTAINER_NAME: ${{ secrets.ECS_CONTAINER_NAME }} - -jobs: - deploy: - name: Deploy StationAPI Canary - runs-on: self-hosted - environment: staging - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - - - name: Build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - IMAGE_TAG: ${{ github.sha }} - run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f ./docker/api/Dockerfile . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT - - - name: Download task definition - run: | - aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} --query taskDefinition > task-definition.json - - - name: Fill in the new image ID in the Amazon ECS task definition - id: task-def - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: task-definition.json - container-name: ${{ env.CONTAINER_NAME }} - image: ${{ steps.build-image.outputs.image }} - - - name: Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v2 - with: - task-definition: ${{ steps.task-def.outputs.task-definition }} - service: ${{ env.ECS_SERVICE }} - cluster: ${{ env.ECS_CLUSTER }} - wait-for-service-stability: true