Skip to content

Commit

Permalink
Change IMAGE_TAG and remove unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
wspooong authored Mar 23, 2024
1 parent b5bcbe3 commit 457911f
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
with:
envkey_VITE_API_URL: ${{ secrets.VITE_API_URL }}

- name: Get current time
uses: josStorer/[email protected]
id: current-time
with:
format: YYYYMMDD-HHmmSS
utcOffset: "+08:00"
# - name: Get current time
# uses: josStorer/[email protected]
# id: current-time
# with:
# format: YYYYMMDD-HHmmSS
# utcOffset: "+08:00"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -47,27 +47,12 @@ jobs:
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ steps.current-time.outputs.formattedTime }}
# IMAGE_TAG: ${{ steps.current-time.outputs.formattedTime }}
IMAGE_TAG: production
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
# - 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: ${{ secrets.CONTAINER_NAME }}
# image: ${{ steps.build-image.outputs.image }}

# - name: Deploy Amazon ECS task definition
# uses: aws-actions/amazon-ecs-deploy-task-definition@v1
# with:
# task-definition: ${{ steps.task-def.outputs.task-definition }}
# service: ${{ secrets.ECS_SERVICE }}
# cluster: ${{ secrets.ECS_CLUSTER }}
# wait-for-service-stability: true

0 comments on commit 457911f

Please sign in to comment.