diff --git a/.github/workflows/ecr-push.yml b/.github/workflows/ecr-push.yml index dcfe795..2981672 100644 --- a/.github/workflows/ecr-push.yml +++ b/.github/workflows/ecr-push.yml @@ -19,15 +19,6 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ap-northeast-2 - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - mask-outputs: true -# with: -# username: ${{ secrets.DOCKERHUB_USERNAME }} -# password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 with: @@ -43,6 +34,15 @@ jobs: version=$(jq -r .version package.json)-$(date '+%Y%m%d-%H%M%S') echo "::set-output name=version::$version" echo "::set-output name=tag::$ECR_REGISTRY/$ECR_REPOSITORY:$version" + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-outputs: true + # with: + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build, tag, and push image to Amazon ECR uses: docker/build-push-action@v3