From af80d169bfff0b47d1e6dd8e81b250796f9cc698 Mon Sep 17 00:00:00 2001 From: gurdl7011 Date: Wed, 18 Oct 2023 19:21:48 +0900 Subject: [PATCH] test --- .github/workflows/ecr-push.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ecr-push.yml b/.github/workflows/ecr-push.yml index 890c43b..4c5ff49 100644 --- a/.github/workflows/ecr-push.yml +++ b/.github/workflows/ecr-push.yml @@ -31,13 +31,25 @@ jobs: 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 }} +# ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }} +# IMAGE_TAG: latest +# run: | +# docker buildx build --platform=linux/amd64 -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" + - name: Build, tag, and push image to Amazon ECR id: build-image + uses: docker/build-push-action@v3 env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }} IMAGE_TAG: latest - run: | - docker buildx build --platform=linux/amd64 -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" + with: + context: . + push: true + tags: $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG