From 720254a31b3a9574357162f766f76dff28c99480 Mon Sep 17 00:00:00 2001 From: gurdl7011 Date: Wed, 18 Oct 2023 16:39:50 +0900 Subject: [PATCH] :: --- .github/workflows/ecr-push.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ecr-push.yml b/.github/workflows/ecr-push.yml index 4d2b708..9d8d658 100644 --- a/.github/workflows/ecr-push.yml +++ b/.github/workflows/ecr-push.yml @@ -11,7 +11,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -38,9 +37,8 @@ jobs: echo "::set-output name=tag::$ECR_REGISTRY/$ECR_REPOSITORY:$version" - name: Build and push Docker image - uses: docker/build-push-action@v3 - with: - context: . - push: true - tags: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}:latest - file: Dockerfile + id: build-image + run: | + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG + echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"